Best practices that I believe should carry over from Python to JavaScript, especially in React

Image for post
Image for post
Do you see the similarities between my Python code and my JavaScript code? (Image source: Author)

If you haven’t read Part I, you should definitely start there. If you have read it, keep reading! Here are five more habits I borrowed from my learning experience in Python that I carry over to my React code on a daily basis.

Read Your Code a Week From Now

Can you tell how it works at a glance? Sparse is better than dense. Readability counts.

One way to make your code very, very readable is to have lots of little parts with very clear functionality. This is known under the name of the single responsibility principle. If your code base is big, there’s going to be…


Patrick’s Blog — Web development

Best practices that I believe should carry over from python to JavaScript, specifically in React

Image for post
Image for post
Do you see the similarities between my python code and my JavaScript code? (Image source: self-made.)

I began my career as a developer and data scientist by using python as a language, which led me to adopt certain practices that I thought were extremely relevant as a programmer. This idea might be controversial for some JavaScript developers, but I think we have a lot to learn in JavaScript (and in my case, especially in React) from python! Those practices are very well summarized in the Zen of Python:

Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better…


Patrick’s blog — Data Science

An explanation of why Django should be your favorite python backend framework

Image for post
Image for post
The terminal command to start a Django project. Give it a try! (Image source: my own computer.)

A lot of people are using one of Django or Flask, and some are even strongly opiniated about either framework to build a REST API. I moved from Flask to Django a few months ago, and I am never going back. I want to see if I can make other people take a good decision!

If you played around with Flask, you were probably trying to serve some functionality requiring data, and therefore a database. You probably started with SQLite, because configuring Flask to a database looked a bit confusing or at least time-consuming, because you probably rely on an…


Patrick’s blog — Data Science

Lessons learned from my journey as a data scientist & machine learning engineer

Image for post
Image for post
Example of what -not- to do, and how you can improve (Inspiration for this picture here. Image by author.)

Like most data scientists out there that began coming out of an interrupted academic career (voluntarily or not, in my case a bit of both!), I began refining my python skills out of necessity to become a data scientist/machine learner. It wasn’t until I had worked with python for about a year that I started profoundly worrying about my python skills (I have some people to thank for that, shoutout to Tomás Moyano, Daniel Montaño and Eric Morfa Morales for their critique of me as a developer, it highly helped me improve!).

So I wanted to share my experience about…

Patrick Da Silva

CTO @ Staiy | Accelerating the transition towards sustainable fashion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store