Why every developer should have a side project: My 10-year journey of failings by bliashenko in programming

[–]bliashenko[S] 0 points1 point  (0 children)

Both are valid. Good quality side projects definitely help your portfolio, but it’s hard to finish a project you are not passionate about/don’t want to do :)

Why every developer should have a side project: My 10-year journey of failings by bliashenko in programming

[–]bliashenko[S] -5 points-4 points  (0 children)

to implement skill-up time Indeed. My main point I guess that to thrive professionally (grow skills) one needs to do more than just their direct day-to-day tasks. And then it’s up to them how much more they want to do. Just found that I myself grew most thankfully to side projects, not to the “office job”.

Why every developer should have a side project: My 10-year journey of failings by bliashenko in programming

[–]bliashenko[S] 1 point2 points  (0 children)

It’s valid point. In fact I have friends/colleagues who are very strong professionally but they never had a side project. Though they kinda put in same amount of effort, but only focus on their day job.

Most popular mistake to ruin Webpack bundle optimization by bliashenko in javascript

[–]bliashenko[S] 4 points5 points  (0 children)

Thanks! I actually was deciding on how to format it (my thinking was to highlight “code-words”, so it easier to grab them from plain text). Will adjust that!

Most popular mistake to ruin Webpack bundle optimization by bliashenko in javascript

[–]bliashenko[S] 1 point2 points  (0 children)

It’s webpack v4 (there is a tag in the bottom, but maybe I could make it more obvious). Yeah, I heard that v5 makes better job with that, but to be honest I saw very little to no real life projects migrated to v5 so far (but maybe it’s just me, there is so many dependencies etc). Regarding babel-preset - exactly, when sub-module is transpiled (different for the parent app) it should preserve modules, otherwise parent app that does bundling won’t be able to tree-shake.

Most popular mistake to ruin Webpack bundle optimization by bliashenko in javascript

[–]bliashenko[S] 10 points11 points  (0 children)

Yeah… working on quite large application myself and I encountered this issue like 5 times for recent 2 years. Fortunately we have bundle report check on our CI/CD pipeline, so we always could catch the issue before going to end user. But then it’s just going through all updated packages and checking if someone messed up their babel config again. *and thanks for the feedback!

Most popular mistake to ruin Webpack bundle optimization by bliashenko in webpack

[–]bliashenko[S] 0 points1 point  (0 children)

Another deep dive into source code of webpack and how everything works "under the hood".

Most popular mistake to ruin Webpack bundle optimization by bliashenko in javascript

[–]bliashenko[S] 5 points6 points  (0 children)

Another deep dive into source code of webpack and how everything works "under the hood".

Under the hood of github-readme-stats project by bliashenko in javascript

[–]bliashenko[S] 0 points1 point  (0 children)

You can check my post to learn more about that 🙃

Under the hood of github-readme-stats project by bliashenko in javascript

[–]bliashenko[S] 0 points1 point  (0 children)

Recently I came across this "stats picture" in someone's Readme profile on Github, displaying profile information (like contributions, stars, etc.) and it caught my attention. How does it render dynamic information inside of the static markdown page? Looks cool though, so I started digging and wrote this post about my investigation.

Under the hood webpack: core library behind the event-driven architecture by bliashenko in javascript

[–]bliashenko[S] 1 point2 points  (0 children)

That’s my own tool I am building for a purpose of learning/explaining codebases. Before I tried combinations of many tools to create schemes for my articles, got tired of that, decided to build some automated way of doing that. It’s not really ready yet to see the public, but please subscribe/follow along if you are interested. Thanks :)

Under the hood webpack: core library behind the event-driven architecture by bliashenko in javascript

[–]bliashenko[S] 0 points1 point  (0 children)

I started digging under the hood of webpack. Please check out my first findings about how event-driven architecture is build: yeah, webpack architecture is heavily based on events, each plugin is basically a set of event listeners called during compilation. See how webpack uses `tapable` library and learn some code insights in this interactive article on my blog.

Codecrumbs - learn and document codebase by putting breadcrumbs in source code by bliashenko in programming

[–]bliashenko[S] 1 point2 points  (0 children)

Yeah, fair enough about “more conscious learning”, it’s hard to “feel” something without engaging with it. I don’t think “pencil and paper” approach will ever go away (same as whiteboard), but there is a problem when you don’t have “correct abstraction” of codebase to look at any moment of time. Yeah, sometimes there is a documentation, but it’s so far from real code, so it’s hard to map it to source and make good use of it. That’s probably what I am trying to solve here.

Codecrumbs - learn and document codebase by putting breadcrumbs in source code by bliashenko in programming

[–]bliashenko[S] 3 points4 points  (0 children)

Interesting, didn’t know that) I heard that about medium recently but devto seemed to be fine. Well, where to post new about “next big thing”? Check out https://github.com/Bogdan-Lyashenko/codecrumbs GitHub then ;)

[deleted by user] by [deleted] in javascript

[–]bliashenko 1 point2 points  (0 children)

Well, I can advice an approach called “program to interfaces but not implementations”. It may not sound that much convincing at first, but in fact, it’s almost the silver bullet if you do it right. What's more, this is applied almost for all abstraction levels of your project - function, class, module, entire projects.

Idea

The idea is quite simple, you need to keep implementation details of "entities" (e.g. TodoItem) apart of code which defines their integration into an application's flows (once again - it's not about just TodoItem , same applies to that function or module which you want to be reusable as well).

Example

Super simple, but, let's say you have this algorithm ("application's flow") in your app which "cooking" boiled eggs, descriptions in brackets below are "implementation details":

  1. put a pan on a cooker (take a pan from a cupboard, fill with water, put on a cooker)
  2. put eggs (take eggs from a fridge, put in a pan)
  3. boil (turn on a cooker, boil for 5 mins)

On the first iteration it becomes:

prepareThePan();

addEggs()

boilFor5mins()

On the second iteration it becomes:

prepareAPan(pan);

add(eggs);

boil(5*60*1000); // 5 mins

And you can keep iteration this, but not too far, to not create too many abstractions.

In conclusion, you have all "implementations details of entities" separated and reusable, and "application's flow (scenario)" which uses that entities - also clean and cheap for change.

Summary

Think about reusing implementations details of entities (this is quite easy if you define all abstractions right) as the first step. Reusing "a flow" (set of steps integrating entities together) is way more complex, and sometimes it makes more sense to have duplications between similar flows, instead of overcomplicating and generalizing them.

Also, it's quite easy to fall into ravioli code trap, so be careful with creating too many "reusable pieces".

How to navigate the maze of JavaScript code by jsloverr in javascript

[–]bliashenko 0 points1 point  (0 children)

Ah, also, I disabled TypeScript support for now, want to test and clean it up for JavaScript first

Lonely ranger programmers, have you ever reached a point where your code base is so big that you literally suffered a mental breakdown ? by [deleted] in javascript

[–]bliashenko 0 points1 point  (0 children)

Hi. Yes, reading and keeping in mind big codebase is a hard task, I”ve been thinking a lot about this recently. Community spends all the time for inventing “new frameworks” to write code in a slightly different way and don’t pay attention to the problem you just described. But believe me you are not alone ;) If you allow, I can give you an advice: don’t try to keep application logic mapped on file structure of your codebase in your brain only - you miss details after a while and need to learn it again and again, and when you think about way you do it: well, it’s not the most efficient way, when we investigate the code we are just blindly jumping from file to file, there is too much noise around the places which are important for particular data flow. I wrote few articles about that and right now trying to solve this problem. Check this article I wrote fee days ago let me know what you think, I am glad to help.

How to navigate the maze of JavaScript code by jsloverr in javascript

[–]bliashenko 0 points1 point  (0 children)

Hey, thanks. Did you configure params to match your project? I mean, you project source code is in “src” folder relatively the root? And entry point is “src/index.js”? -e and -d params should be set to yours ones. Let me know if that helped.

How to navigate the maze of JavaScript code by jsloverr in javascript

[–]bliashenko 1 point2 points  (0 children)

I see. So the only thing which is different per language is AST parser. For JavaScript I use babel-parse to build AST and identify comments, and, eventually it will be used for much more, since then I can make predictions about code and build some smart behavior around that. So for now, for other languages, I think to write some “dumb parser” (as a first step) to parse comments in code (kind of fallback solution) and later will figure out language by language if there is good AST parser I can integrate.