100 Days of pain — Day 6: Big picture

Incompetent Coder
4 min readNov 14, 2018

--

In Day 5 I talked about what I did in the last week or so. I had to code about one hour a day to solve a problem on my day job. Something which was not terribly complicated but that anyway I managed to do with a few simple python scripts.

Before reaching that point I was trying to implement one of the first big features of my Flask app: a data table with dynamic behaviours like sorting, column resizing and reordering etc.

The Table gets data from a SQLITE file database which I detailed before in the first 4 stories. Now at this point after a bit of googling and asking around I had 2 main choices:

Choice A — Use JQuery Datatables

Choice B — Use React.js

So I imagined myself in the situation of having like little time to decide HOW to implement a feature choosing between a JS plugin/script or having to learn a whole new framework and creating like a strange mash up of Flask and React.

I decide to go on the easiest path. Got the Datatables plugin up and working on a test set of data. The way to reach this point was not straighforward…

The main goal is to understand (from a beginner point of view) what are the different aspects of a piece of code. Guess what? It’s not only the code itself….

Monolithic software development

On my day job tipically every software or application (which might include hardware + software) is starting from customer specifications which is a signed document (subject to infinite revisions, email comments, conference call discussions…). The next step is coding often doing in one big batch and tested all at once in one place with the customer (plus a lot of emailing back and forth during the process). Final step is testing.

Sometimes there is one or more revisions also in which:

  1. Customer is trying to pull in as much as changes as possible for free and to obtain bugs resolution
  2. Software company is calling enhancement the process to solving a bug in order to ask more money for the new coding

Sometimes there is also a third party, a sort of middle man helping the software guys to deliver a good product and helping the customer to define its needs. We will skip this part here…

The one above is an extremely over simplified scheme. But good enough to start a discussion on two other basic skills:

  1. Writing technical documentation and requirements definition
  2. Writing testing protocols and perform testing itself (plus going back and ask the GOOD changes)

If you get your hands dirty with css and html and js probably you just need code. Specifications for a company website are probably not written on a paper and testing is not formally organized.

But if you have a website plus an application or a common application which runs outside the browser then you need to know these other worlds. To know they exist….I know a little about these other two more than coding actually…

On the other side back to my implementation problem at one point I wanted to stop writing on my laptop and wanted to have a testing platform (what a fancy name). Why? Because I wanted to know before it was too late what I would need to put Flask up and running on a proper web browser and to have a server environment.

This topic alone opened up a few other basic skills (some of those I already had since high school!):

  • Setting up a server (virtual machine, droplet on Digital Ocean, physical at your home) is a nice skill to have. Installing servers, coding environment, setting up directories etc. (I have RedHat RHCSA by the way…)
  • Learn to use the command line in Linux
  • Learn FTP basics
  • Learn Web Server configuration (the minimal amount to get the server running) and WSGI Server config
My Flask application environment

All the above for me helped me in building a better understanding of the various part even of a simple application like mine. Just be aware that all of these components exist and reside in some part of your server….

In this way now I have somewhat my final configuration and I can test HTTP requests from the internet.

Closing line:

Command line, Administration, Services, Servers are difficult topics. I use them since 10 years or even more. Don’t believe anyone telling you can go from 0 to hero with a tutorial. It is just costant habit development.

The easiest way to do it I suggest to you is starting from your computer with a virtual machine. Choose Virtualbox, VMWARE, Parallels or whatever is your preference and install a playground environment. If you make a mistake no problem…just restart from 0.

Just do it. See you at https://medium.com/@magyar1886/100-days-of-pain-day-7-good-code-fb295be26626

--

--