diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2026-02-01 20:01:56 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2026-02-01 20:01:56 +0100 |
| commit | f510077aaefb1477fad28563e2637c424332ae61 (patch) | |
| tree | 2707f9d42a6bce50a8ebeec30b61aa1c2dbcb8a6 /content/posts | |
| parent | 28ca1aa004ee80b6325526db1479ba05acd22367 (diff) | |
Added the python post
Diffstat (limited to 'content/posts')
| -rw-r--r-- | content/posts/python.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/content/posts/python.md b/content/posts/python.md new file mode 100644 index 0000000..d1ec9c0 --- /dev/null +++ b/content/posts/python.md @@ -0,0 +1,41 @@ ++++
+title = "Python is king"
+date = 2026-02-01
++++
+
+> TLDR; Learning python brings you the most return on investment for your time.
+
+Although python has it's share of gripes, it is the most useful programming language to learn as an engineer. Before you start grabbing your pitchforks, I say for engineers not for programmers. This article is written to:
+
+1. Explain why I learnt python and situations where I find it useful.
+2. Convince engineers to add python to their list of tools to broaden their horizon considerably.
+
+A much better case for python has been made by [Cameron](https://cameron.rs/blog/python-sucks/) but here is my opinion for reference.
+
+## Simplicity
+
+Python is simple from a developer and user perspective. Installing and running python takes less than 5 minutes in Linux and MacOS. OSs install python by default in a few cases. Setting it up in Windows takes more effort as is the case with everything else in Windows. There have been instances with the python executable not being added to the path when I installed python but starting with python is a smooth developer experience. There are excellent integrated development environments or text editors with plugins that make the developer experience enjoyable. I currently using VS Code with the appropriate plugins. I would like to switch to neovim in the future. But slowing down my developer output is not viable at the moment.
+
+## Packages
+
+Here is a list of things I have used python for in no particular order:
+
+- Extracting and combining PDF pages
+- A web application using [Dash](https://dash.plotly.com)
+- The first version of my hobby project [Match up](https://mu.karanj.com) was built using [Flask](https://flask.palletsprojects.com)
+- Parsing my bank transactions and visualizing data using [matplotlib](https://matplotlib.org)
+
+I use [numpy](https://numpy.org) and [scipy](https://scipy.org) extensively to generate data for signal processing at work. I am evaluating TensorFlow and PyTorch as alternatives. I routinely perform measurements in the laboratory where [pymeasure](https://pymeasure.readthedocs.io) is invaluable. This is to demonstrate that I don't have to write much code myself before I see direct benefit in my day to day activities. I am leveraging work of smart people, much smarter than me. This doesn’t mean that I don’t try to understand the underlying systems. As an engineer I try to understand all the tools I use as best as I can. A few abstractions can be examined a later point in time though. I try to avoid unknown packages and stick to large libraries to minimise chances of malicious code.
+
+## Community
+
+
+
+Popularity of the language and general acceptance matters. Python has one of the [largest](https://www.tiobe.com/tiobe-index/) community of developers. It is backed by several large companies and there is always a need for python developers. When I run into an issue or bug, I almost always find useful tips on stackoverflow, blog posts or tutorials. Sharing your code via scripts and packages is easy. I have run into issues with MATLAB where it takes colleagues hours to figure out how to install it along with the toolboxes needed to run my code. Allowing anyone in the world to use the tools I make is important to me.
+
+## Practical tips
+
+- Use [UV](https://docs.astral.sh/uv/), nothing else comes close in managing python versions, dependencies and environments. Try to stay away from the latest version of python. One version older is the sweet spot as your dependencies will support it.
+- A simple scripts can take you a long way before needing a more complex project. Specify [dependencies](https://docs.astral.sh/uv/guides/scripts/#creating-a-python-script) `uv add --script` run scripts using `uv run`.
+- Create packages when distributing your work as a black box. It is a simple procedure by specifying a `pyproject.toml` document in your root folder.
+- A simple README file goes a long way in documenting your work other than the comments in your code. More complex documentation can be handled by [pdoc](https://pdoc.dev). The absolute best in class with all features is [sphinx](https://www.sphinx-doc.org).
\ No newline at end of file |
