Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "dev"


Set up React Toolchain from the Ground up

  • This guide is designed for those who want to get their hands dirty to get up and running with a React application from scratch with no preconfigured environment, or hidden magic behind the scenes, or at least have some idea of what’s going on under the hood.
  • A React application build typically is a set of tools that is used to perform a complex tasks, and its consists of three main tools: Package manager Yarn or Npm, Bundler webpack or Parcel, and a Compiler such as Babel (new JavaScript features).
  • I prefer to use brace expansion (snippets below) for installing similarly named packages; its hackable, prettier, and time saver.
  • I specified ’src/components’ as my module directory for tutorial’s purpose, but as your app grows you'll have to override that setting based on your needs.
  • Under tests/ directory create App.test.js file.
  • The first time this test is run, Jest creates a snapshot file.

save | comments | report | share on


Jelly Fin: Got a minute? We could use it!

  • Finances are hard.
  • It's one of the first adulting things everyone has to wrestle with.
  • So, let's make it easy and automate it.
  • Over the course of several years, my wife and I have tracked our finances using a forecasting method and had done it all within a spreadsheet.
  • The time came where I wanted to take this concept and make it mobile using serverless architecture and clean design.
  • These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
  • See deployment for notes on how to deploy the project on a live system.

save | comments | report | share on


Demystifying Webpack

  • Let's breakdown the concepts of webpack and understand what happens during the bundling process.
  • A bundler is a utility/program that takes a number of files and puts them together in such a way it doesn't change how the code works.
  • And I defined A.js as my entry point for webpack and the output to be a single bundled file.
  • The first thing webpack will do is analyze the modules that are present and form a dependency graph.
  • Likewise it keeps adding content of the modules to the output file till it has finished traversing the dependency graph.
  • While webpack is creating the graph it also marks whether the module is used or not.
  • The code is quite simple to understand it takes in a moduleId and checks whether that module is present in installedModules cache.

save | comments | report | share on


Software People — How Do You Deal With Stress/Bullies/Frustration?

  • As a full-time open source software developer/advocate — who's been working remotely for the last five years — I have had my fair share of problems with Stress/Bullies/Frustration and all sorts of such stuff.
  • How do you deal with Stress as a software person?!
  • As someone who has been in and out of therapy for almost 30 years now, I can tell you what you deal with has much more to do with being a human than it does with being a software developer.
  • Therapy is a good thing, and I recommend finding one that you are comfortable getting emotionally naked with.
  • What I meant was therapy or advice from someone who's been in such conditions and have had a career in software.
  • One of the things that makes me feel better is the "jerk tax".

save | comments | report | share on


10 practices for readable code

  • Over the last several months I've worked to distill these elements into 10 practices for writing code with a focus on improving readability and decreasing complexity.
  • All those commented blocks, unused variables, and unreachable code are rot.
  • Nested code can often be removed by guard clauses, early returns, or aspects of functional programming.
  • While I don't adhere to hard numbers, code blocks do reach a critical length.
  • This simple process allows you to determine the context and abstraction level of the code block so you can properly refactor the code into a more readable and less complex block.
  • Now I provide another number in the series 2, 4, 16 and ask, "What's next?" Now with three data points our programmer brains see the squared series and determine the next number to be 256.
  • This touches naming, formatting, architecture, block size, basically anything that contributes to code appearance.

save | comments | report | share on


$1m to pay open source maintainers on Tidelift

  • We’re dedicated to creating an effective way to do just that, and today we’re announcing a major milestone on our journey, as we pass $1 million committed to pay open source creators on Tidelift.
  • With the Tidelift Subscription, we make it easy for professional software teams to get one-stop shopping for security, licensing, and maintenance assurances for the wide variety of open source software they use.
  • Tidelift makes it possible for open source creators to get paid by adding net-new valuable assurances around their software.
  • Today we’re excited to announce that we’ve reached a significant milestone, with over $1 million in committed payments for maintainers via the Tidelift platform.
  • Together, we are solving acute problems faced by professional software teams who build on open source software, and in so doing we are rewarding the maintainers of that software and supporting their work.

save | comments | report | share on


React router beginners guide

  • In single page apps, there is only single html page.we are reusing the same html page to render the different components based on the navigation.
  • React router gives us three components [Route,Link,BrowserRouter] which help us to implement the routing.
  • Url parameters help us to render the same component based on its dynamic url like in our Users component assume that they are different users with id 1,2,3.
  • Now open your browser and manually type this url localhost:3000/users/1 you will see an object in your console which is passed by the react router.
  • In our routing app, we have three routes which are [home,/users,/contact] Let’s style them using NavLink.
  • We need to add a new prop called activeClassName to the NavLink component so that it applies that class whenever the route it is active.
  • To navigate programmatically we need to take the help of history object which is passed by the react router.

save | comments | report | share on


Why JavaScript is an OOP Language (Even Though It Doesn't Have Classes)

  • The style of OOP where there is no difference between classes and objects is called prototype-based programming (to make our lives easier, we'll call it PBP).
  • I mentioned earlier that in PBP an object contains all of its methods and properties, as well as their actual state.
  • Like everything in programming, PBP and class-based OOP fall in a spectrum of tradeoffs.
  • Regardless of a developers OOP language of choice, the onus is still upon the developer to use the language well to achieve encapsulation (or modularity), to appropriately use polymorphism, and to judiciously apply inheritance (class-based or prototype-based, depending on language).
  • Inheritance is sometimes abused to achieve reuse of the parent (or prototype) functionality rather than used as a polymorphism facility by the caller of methods of a family of objects who provide the same interface (the same contract of behavior).

save | comments | report | share on


How to create REST API using Pyramid

  • Pyramid is a lightweight python web framework following MVC architectural pattern.
  • In this article, we will set up a web application and API using Pyramid.
  • Pyramid is a suitable framework for large scale MVC applications and it comes with flexible bootstrapping tools.
  • Cornice, a library from Mozilla, makes it easy to develop RESTful web services with pyramid.
  • We create a models.py file with a class Note which maps to the data table storing all the values of notes.
  • In views.py file, we add our services for different API requests.
  • We can view the notes by navigating to the URL http://localhost:6543/notes in browser.
  • Hope the article was of help!
  • The article originally appeared on Apcelent Tech Blog.
  • We deliver Excellent Web, Mobile and Distributed Apps!
  • We’re a place where coders share, stay up-to-date and grow their careers.
  • We strive for transparency and don't collect excess data.

save | comments | report | share on


Refactoring Legacy Monoliths - Part 3: Game Plan And Refactoring Tips

  • Having tests in place is like doing acrobatics in the air with a safety net vs.
  • Your first goal should be to start implementing unit tests on your code.
  • You need to be able to change your code and have confidence that it still works.
  • Your first goal should be to implement code-based testing.
  • LinkGenerator needs access to "Thing 3", which is, the HttpSession.
  • We can't test this method because it references the HttpSession object that only exists in a web application.
  • We don't want our models or business entities to know about the web (this is in line with our goal of isolating business entities from the presentation of our data).
  • Take a chunk of code that does one thing, and create a new method out of it.
  • Avoid references to global state (like HttpSession) so that you can unit test your new methods.

save | comments | report | share on