Better HN
topnewbestaskshowjobs
Log inSign up

johnjr

7 karma · joined Jan 6, 2024 (2y ago) · 15 submissions

Submissions

1.

The Reflection on My First Year at Meta (Facebook)(johnjr.dev ↗)

4 points · by johnjr · 5mo ago · discuss

comment 10mo ago · link · parent

Very nice job!

comment 11mo ago · link · parent

I know the stress of preparing for technical interviews at companies like FAANG. That's why I'm kicking off a new series to demystify the most critical coding interview concepts. First up: Binary Search. It seems simple, but its variations are where most candidates stumble. In this first post, I break down the algorithm, reveal the hidden patterns in its complex variants, and walk you through structured approaches to solve related problems efficiently.

4.

A New Series on Cracking FAANG-Level Code Challenges(johnjr.dev ↗)

2 points · by johnjr · 11mo ago · 1 comment

comment 1y ago · link · parent

In this post, I will explain in detail how I used the builder design pattern together with the bit mask field technique to reduce complexity. As a result, I decreased the cyclomatic complexity from 24 to 0 and reduced development time from hours to minutes.

The rest of this post is organized as follows sections:

- The problem explains the problem I was solving. - Creating the bit mask field presents a solution to the problem. - Cyclomatic Complexity discusses cyclomatic complexity and calculates this metric for the solution presented in the section above. - Builder design pattern explains the builder design pattern and describes the refactoring process that removed complexity. - Conclusion summarizes this post. - References provides references related to the topics discussed here. All the examples shown here are in C++.

6.

Builder Design Pattern and Cyclomatic Complexity Reduction(johnjr.dev ↗)

2 points · by johnjr · 1y ago · 1 comment

comment 1y ago · link · parent

Hi @linguae, The video in the post, originally presented by Barbara Liskov, is a very interesting resource on this topic. Let me know if your students want to discuss this in more detail, and please share their ideas!

comment 1y ago · link · parent

In software development, organizing our codebase in a way that is easy to maintain is always a good practice, and this idea is not new. Actually, I think this started in 1968 when the term software crisis was coined. Since then, we have developed many principles to help us achieve this goal. One person who has made many contributions to this field is Barbara Liskov. She is very famous for the Liskov Substitution Principle (LSP), but she also invented the Abstract Data Type(ADT), which is the core concept of classes and object-oriented programming. Here, I want to discuss composition compared to inheritance and how understanding the Liskov Substitution Principle can help you develop better software.

9.

Composition, Inheritance, and Liskov Substitution Principle(joaojunior.org ↗)

3 points · by johnjr · 1y ago · 3 comments

comment 1y ago · link · parent

I described how I improved an ETL process to be more than 4x faster using the same resources. While the old architecture used Python threads, the new one used task queue architecture to be more reliable and scalable. So, I will explain how we can improve a legacy code and speed it up by only modifying the architecture to run the code.

11.

Improving Legacy Code: Using Task Queue to Speed Up a Crawler in an ETL Process(joaojunior.org ↗)

1 points · by johnjr · 1y ago · 1 comment

comment 2y ago · link · parent

I just wrote a post about how the Cpython is much faster without GIL:https://news.ycombinator.com/item?id=40988244

13.

Is CPython Faster Without the Global Interpreter Lock(GIL)?(joaojunior.org ↗)

7 points · by johnjr · 2y ago · discuss

14.

Lua scripts are not atomic in Redis(joaojunior.org ↗)

3 points · by johnjr · 2y ago · discuss