Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "software-development"


React Router - How to pass History object to a component

  • I had to solve the situation: I had got a component, which was embeded deeply in a Route component (this Route was under a Browser Router component).
  • I needed to use history object from the Router history.
  • I started to remember my bad adventures with old React Router and circumstantial history manipulation.
  • There is a magical higher-order component, that name is withRouter.
  • It takes place in the react-router-dom package also.
  • With its help, you can pass the whole history object to your component as properties.
  • As you can see above, after we let the withRouter component to do its job, we can easily reach the necessary data and functions in connection with history.
  • The history object has several property, you can check it in the documentation.
  • We’re a place where coders share, stay up-to-date and grow their careers.

save | comments | report | share on


Build Android app with rust

  • Wow, I have never thought about building Android app in Rust, nice to see it's possible (despite the fact that I am not so good at coding in Rust as in other languages).
  • Will probably experiment with it in the future.
  • Thanks!
  • The heartbeat of the software industry.
  • 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


Sometimes, the elegant implementation is just a function

  • This perhaps relates to our last episode about lasagna code.
  • A lot of code is simply overly complex -- there's too much overhead and architecture to accomplish something simple.
  • I find it unfortunate that some languages, ahem Java and C#, don't even offer global functions.
  • What do you think?
  • Is a plain function sometimes the right thing to do?
  • I'm a creative writer and adventurous programmer.
  • I will teach you how to slay monsters.
  • 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


Friday hack: Suspense, Concurrent mode and lazy to load locales for i18n

  • I had to "hack" Suspense, ConcurrentMode and React.lazy.
  • The easiest way to fix it, given that we use CRA and don't want to eject, it to use react-snap.
  • On the other side, we have React which will start to render as soon as all scripts will be downloaded (around 3s in the US on average 3G, for the given example).
  • When React will start to render and if not all dynamic resources will be loaded it will flush all the content it has and typically this is the almost white (empty) screen.
  • Dynamic resources can be: async components (React.lazy(() => import())), locale catalogs (import("./locales/" + locale + "/messages.js");).
  • To solve the problem we need to wait for all resources to load before React will flush the changes to the DOM.
  • The second one is that we need to repurpose React.lazy to wait for subresource.

save | comments | report | share on


AoC Day 15: Beverage Bandits

  • Ho ho ho holy cow.
  • Day 15 is a doozy.
  • The elves and goblins are having a battle, and your code is in charge of everything: the decision-making, the path-finding, the moving, the attacking, the HP and more.
  • Happy war-gaming!
  • 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


React Authentication App Using Redux And Sagas

  • Let's establish the fact that Redux is not related to React.
  • Said that, Redux gels with React impeccably.
  • So, let me answer the question what is redux?
  • To keep it simple Redux is “open-source JavaScript library for managing application state”.
  • You can use the backend API service that I have in my repo i.e.., Authentication with Node and follow the instructions mentioned in README file to run the service or you could use your own json web token based API.
  • To start the show we have to stage our react app.
  • Now you have staged your react app.
  • Let's go throught the folder and files we have just created: login/, register/ & user/ login/ & register/ are the routes that we are going to use.
  • Let's dig in, Switch <Switch> is unique in that it renders a route exclusively.

save | comments | report | share on


How I hate the term « Ethical Hacker» !

  • We are all susceptible to be attacked by a malicious hacker, whether it is to get money, data, for fun, etc...
  • For me, a hacker is a person who is curious, a person who instead of just using his toaster will use it, but also open it, understand how it works and finally customize it (for example, add a little voice that wishes us a good day).
  • You can't really control what the mainstream does with technical terms and titles, but it's worth trying to use good descriptive vocabulary where possible.
  • Yep - it's enshrined in the Certified Ethical Hacker qualification, which was a bit naff in practice (I did V7 of this back in '09 I think) - my colleagues & I spent most of the week long course messing with the instructor's router, which was frankly rather more fun!

save | comments | report | share on


Side project success 🎉

  • Like everyone else, I have a couple of these, hell I have a 2 year project that I haven't even come close to finishing.
  • First built with AngularJS 😣, then Angular 🙆, now Vuejs 😌 I still work on it till this day.
  • Months back I created an Android app.
  • I stood on top of desks shouting out my app on campus, emphasis on 5 star reviews.
  • This wasn't good at all, I had to improve UX to at least keep people from uninstalling my app.
  • A short spike in downloads and some reviews, all 5 stars.
  • Although there's still work to be done i.e. landing page, tests, CI intetgation for README badges, but it is a complete project!
  • I can't remember the post that motivated me to start the project but I found it here on dev.to, literally days after joining.

save | comments | report | share on


Object Oriented Programming

  • So you see, both procedural and object-oriented paradigms were trying to solve the same issues: the issue of mutating the global state and breaking down complex tasks into smaller modular units (subroutines/functions vs.
  • Contrary to procedural and functional paradigms where we would pass data from a function to function, manipulate it and return it, in OOP we want the object that encapsulates that data (has it in its internal state) to do the manipulation for us.
  • In other words, the interface defines the methods a class needs to implement in order for our program to work otherwise it will break.
  • Good example - Since we programmed to an interface and not an implementation, changing the storage method is just a matter of changing the class we provide through the App's constructor, we are changing just one line of code.

save | comments | report | share on


Reference Guide: Committing Changes with Branches

  • When I first started working with branches I could never remember which branch I was on when it came time to commit changes.
  • My go-to command quickly became git branch.
  • COMMITTING CHANGES WITH BRANCHES It’s best to think of the master branch as production.
  • Therefore, it’s best to never push to the master branch.
  • When using branches remember they run parallel to the master.
  • As soon as a new project is created get into the habit of creating a new branch before making file changes.
  • It’s also best to create a new branch for each design feature.
  • Lifetime lover of organization embarking on new career chapter as Full Stack Web Developer.
  • Relish making order of chaos.
  • Systems thinker.
  • Provider of pragmatic client focused solutions.
  • The heartbeat of the software industry.
  • We’re a place where coders share, stay up-to-date and grow their careers.

save | comments | report | share on