In: computers, software.

Computer programming

Computer programming is the process of designing and building an executable computer program that executes some tasks.
The source code of a program is written in one or more languages that are intelligible to programmers, rather than machine code, which is directly executed by the central processing unit.

Writing software for a living involves tasks such as:

Programming is not about writing as much code as possible. Programmers don’t need to type very fast.

Applications are like trees: they grow, evolve, twist and turn and need soil (the computer’s operating system) and care (maintenance).

I have seen source code that is pure chaos, but it works and does what it’s supposed to do.
And I have seen neatly organised source code and it works just the same. And everything in between chaos and order. The diff between them is when you need to understand, or fix a bug, or implement a new feature for that application.


Quotes

Programs must be written for people to read, and only incidentally for machines to execute.
– Harold Abelson, Structure and Interpretation of Computer Programs

That’s the thing about people who think they hate computers. What they really hate is lousy programmers.
– Larry Niven

We think awful code is written by awful devs. But in reality, it’s written by reasonable devs in awful circumstances.
– Sarah Mei

The secret to building large apps is never build large apps. Break your applications into small pieces.
Then, assemble those testable, bite-sized pieces into your big application – Justin Meyer, author JavaScriptMVC

Walking on water and developing software from a specification are easy if both are frozen.
– Edward V. Berard

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
– Martin Golding? John Woods?

The problem with quick and dirty… is that dirty remains long after quick has been forgotten.
– Steve C McConnell

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?
– Brian Kernighan

The hardest bugs are those where your mental model of the situation is just wrong, so you can’t see the problem at all.
– Brian Kernighan

I hate code and I want as little of it as possible in our product.
– Jack Diederich

The basic ideas of good style, which are fundamental to write clearly and simply, are just as important now as they were 35 years ago.
Simple, straightforward code is just plain easier to work with and less likely to have problems. As programs get bigger and more complicated, it’s even more important to have clean, simple code.
– Brian Kernighan

Problems can usually be solved with simple, mundane solutions. That means there’s no glamorous work. You don’t get to show off your amazing skills. You just build something that gets the job done and then move on.
This approach may not earn you “oohs” and “aahs”, but it lets you get on with it.
– Jason Fried

A (programming) language that doesn’t affect the way you think about programming is not worth knowing.
– Alan J. Perlis

Perl - the only (programming) language that looks the same before and after RSA encryption.
– Keith Bostic

My personal journey

(I will eventually finish this and publish as an article, WIP)

I started to learn some scripting in high school, around 2001. I didn’t have my own computer back then. I was going to internet cafes, finding websites with information that I wanted, printing them and I would study the paper at home. I was writing logic statements on paper, trying to simulate a computer.
I started with IRC scripting for mIRC and other IRC clients. I made auto-replies, aliases and functions. I think it was a language kind of like Javascript.

I also learned how to type at home, without a computer. I hand drew a keyboard with the correct order of keys and I was practising in my bed.

I remember one day in a cafe, I was trying to draw some ASCII art for an IRC channel. Somebody behind me saw the unfinished art and said “Are you a hacker or something?”
I couldn’t do shit, but I definitely felt cool for a little while.

I learned programming all by myself, because I wanted to make an RPG game.
I didn’t know anybody that knew even a little bit of programming. I learned everything from websites and forums.
Later on, I started a Computer Science college, but I abandoned it after 2 years. It was way too boring.

I didn’t know how to start in programming, so I was trying to take the shortcut. I didn’t even think I would learn to program… thought it was too complicated.
I found some open source games and I tried to hack them, to make them do what I want.
Of course, I didn’t even know what I wanted. Something. Anything. Just to build my own thing.
I hacked around source code in C and C++, Visual Basic and different other kinds of Basic, even PHP and Perl. I tried different visual tools and scripting tools, Dark Basic, Game Maker, RPG Maker… I don’t remember all of them. I was obsessed.
I stayed away from Java, thank God I was protected from evil.

A lot of stuff wasn’t even compiling or running on my computer. Either the code I found on forums was incomplete, or I was doing something totally stupid.
Or my computer was total crap - and it really was, because I got it for free from a cousin…

I started to be serious about programming in C++, I think in 2005. I was reading and following a free book, I don’t remember which one, but I learned a lot from it.
I made small apps in Visual Studio Code, some music players for sure, a few others, but I don’t have them anymore. I started a lot of small apps, but never finished anything.

I became serious when I understood that there’s no shortcut. I have to dedicate my time and energy and slow down.
Before this, I was in a state of anxiety and pressure. I wanted to finish faster, faster, faster. I wanted to make the perfect game, play it, show it to everybody, prove that I can do it, become a millionaire, become a God… or something like that.

I played with LUA for some time. I made a simple text game like a loop, where you could write commands for moving, attacking and checking the inventory.

I learned a lot from hacking into other people’s code. See what happens if I change this variable, if I move this function.
I asked a ton of really stupid questions on forums. I think daniweb.com forum was popular back then.
I broke libraries and applications in hundreds of different ways and I slowly started to get something like a “gut feeling” for code.
There was no stackoverflow. I didn’t learn programming from Youtube. If I had started today I would have taken a totally different route, of course.

I discovered Python at the start of 2007 and I was instantly in love.
I devoured 2 free books in 2 days. I was pumped!!
I re-wrote my small text game in Python and this is how the big and long journey started…

I read all the documentation from all the Python built-in libraries. This is a rare thing to do, I learned. When I had an interview for a job with 3 senior Python programmers, they asked me something about lists, I don’t remember exactly and I solved it with a function that they didn’t know existed. Maybe it was list.remove I honestly don’t remember.
The team lead told me “If this function exists on lists and I didn’t know about it, I SWEAR to you, I will rewrite half of my code!”
It existed. Maybe he’s still rewriting, even today. They had a lot of Python code.

In 2012 I played with Ruby and in 2013 I re-wrote one of my small projects in Ruby. I absolutely loved it!
The Ruby syntax is, to me, the most beautiful and elegant programming syntax out there.
And Elixir too, of course.
I discovered Elixir in 2016 as a freelancer, I had a client who specifically wanted me to use Elixir for an application, so I used Phoenix on the server-side and React on the client-side.
After that, I tried a few personal small projects in Elixir.

And this reminds me of the most influential people, that changed my direction as a software developer.

By far the most impressive was an old guy that I met when I was working as a freelancer. We worked for a time on a common project. I learned about Elixir and Lisp from him.
He worked as a programmer longer than my age back then.
What inspired me was his experience and the way he could take any problem and crush it until it was something small and easy to deal with. The way he was talking about incredibly complicated problems, he cut through the junk and touched the main problem and extracted it and explained in a way that was simple, but also complete. Imagine you have this big disgusting hairy problem that you don’t even know how to grab; he would look at it and go straight to the core, grasp it and call it for what it was, but in a way that was not ugly and or scary.
That kind of experience. He was impressive.

I still don’t “know Lisp”, but now I’m very excited about it and open to learn. Before I met the guy, I was: “Ugh, Lisp! Too many crappy parenthesis!”

The second big influence is Devine Lu Linvega.
I’m following 100 Rabbits for a few years. I don’t have time to check every day, but I am surprised every-time I catch up.
I don’t even know how to put into words, why… Maybe his immense passion to build things that are both pretty and useful.
Maybe the way he and his friend are living on a boat, the sustainable living and eating, the whole idea of simplifying things, the idea of permanent tools running on tiny machines, the big community that is orbiting around these ideas in Merveilles
He inspired me to create my public memex folder; his website is just like that, a big Personal Wiki.

These guys didn’t teach me something specific, there was no “Kid, this is what you have to do…”, they’re not even “into teaching”. I am learning by myself, as I said, but they were/are a huge inspiration and influence to me.
Of course, I learned a lot from bad influences too. I learned how NOT to behave and what NOT to do.

I remember the first time I had to solve an “impossible problem”.
We had a client with 10 million++ PS file pages for printing, half the population of Romania, but we didn’t have any other data to work with, because the bank didn’t have the data themselves, because they had externalized a part of their IT department, our sales department said we can do anything, blah blah…
We had a week to extract a lot of data from those PS pages, so we can make them work with the printers and the envelope machines.
Nobody else wanted to do it, so I did it. I reverse engineered the PS files, which I learned are just normal text files, managed to extract the names, addresses, number of pages per client and all we needed to generate the reports and the barcodes and it eventually worked, on time. I used Python and regex-es.
My attitude was “OK let’s do it, no idea how, but I’ll find a way”, so it worked. If my attitude would have been “OMFG this is impossible, I can’t do it”, today I would have been a totally different guy.
This experience changed my life and increased my confidence a lot. After doing this a few tens of times I became confident I could do “anything”.

There are precious gems that I found in each and every job, project and programming language.

I didn’t consider myself good enough to even talk about “programmer” until maybe year 2015 or so, even if at that point I was breathing and dreaming code for 14 years. When I was talking to people about what I do at work, I would say “Yeah, I hack around some code on a computer and somehow I convinced them to pay me”. I felt insecure all this time, because I didn’t finish the CS college.
Then I got a job where I had the opportunity to teach. And I taught Python many times. This made me very confident, because people were asking me all kinds of questions and I knew all the answers. Only then I realized that I know a lot.

I can even make websites. But it’s not the most efficient use of my time. It takes me a lot of time, compared to writing scripts, or servers.

For me, programming is an exploratory, intuitive, and creative process.
I can’t say it’s purely logical or systematic. It’s equally, or even more artistic.

It happened to me lots of times to get the answer to a complicated computer problem in my dreams.
When it bothers me that I can’t solve the problem when I’m awake, I take it with me in my dreams.
I don’t actually dream the code, or the editor. It’s not a coding environment, it’s more like a place that I go to. Each file is like a house and there are things inside it: variables, functions, instructions. Then I decide how to arrange them in such a way to work differently and to fix my problem.
Of course, now I’m awake (hopefully) and I can’t really say how I see things in my dreams, I’m just describing what I remember.

I don’t usually say about myself “I’m a programmer”. That’s a small subset of my interests and it doesn’t even span over my entire life.
I don’t even consider myself a great programmer, even if I know I’m good and I have the experience to fix some problems with computers.

I still learn from a lot of people that know things. Anyway, I don’t like to compare myself.

I am a student. I will be a student forever.

tl;dr; Ok so this is the place where I want to explain 20 years of dreaming and breathing code into a single sentence. Well, the sentence is:
“I will never stop learning and I won’t be afraid to make mistakes”.


Zen

Principles of Calm Technology

https://calmtech.com

I. Technology should require the smallest possible amount of attention
II. Technology should inform and create calm
III. Technology should make use of the periphery
IV. Technology should amplify the best of technology and the best of humanity
V. Technology can communicate, but doesn’t need to speak
VI. Technology should work even when it fails
VII. The right amount of technology is the minimum needed to solve the problem
VIII. Technology should respect social norms

Minimize distraction

http://minimizedistraction.com
A call to minimize distraction & respect users attention
Distraction matters because TIME is all we have in life

Malleable systems collective

https://malleable.systems

  1. Software must be as easy to change as it is to use it
  2. All layers, from the user interface through functionality to the data within, must support arbitrary recombination and reuse in new environments
  3. Tools should strive to be easy to begin working with but still have lots of open-ended potential
  4. People of all experience levels must be able to retain ownership and control
  5. Recombined workflows and experiences must be freely sharable with others
  6. Modifying a system should happen in the context of use, rather than through some separate development toolchain and skill set
  7. Computing should be a thoughtfully crafted, fun, and empowering experience

Permatech

http://wiki.c2.com/?PermaCulture
Permaculture bears these behaviors:

The Codeless Code, by Qi

An illustrated collection of fables concerning the Art and Philosophy of software development,
written in the spirit of Zen kōans:
http://thecodelesscode.com/case/1 - The Small Stuff
http://thecodelesscode.com/case/154 - A Bridge To Nowhere
http://thecodelesscode.com/case/234 - Ozymandias

The predictability of a true engineer’s world is an enviable thing. But ours is a world always in flux, where the laws of physics change weekly. If we did not quickly adapt to the unforeseen, the only foreseeable event would be our own destruction.
–- http://thecodelesscode.com/case/154


Funny

Fun & stupid programming gold nuggets.

import this
>>> love = this
>>> this is love
True
>>> love is True
False
>>> love is False
False
>>> love is not True or False
True
>>> love is not True or False; love is love  # Love is complicated
True
# from https://github.com/satwikkansal/wtfpython
- Dad, what are clouds ☁ made of?
- Linux servers, mostly.
if (brain!=empty) {
    keepCoding();
} else {
    orderCoffee();
}
Roses are Red
Violets are Blue

Unexpected { on line 42.

Create party algorithm in C++
https://instagram.com/p/BvE6-DADxDT

bool createPartyAlgorithm() {
  bool partyOn = false;
  ...
  return partyOn;
}

https://reddit.com/r/ProgrammerHumor/comments/ohkif9/such_flirting_much_wow

Hey girl,
SELECT * FROM girls
ORDER BY attractiveness DESC
LIMIT 0,1
// keeps returning you...

Links

Energy efficiency across Programming Languages

How do Energy, Time, and Memory relate?
https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf

Comby - structural code search and replace

https://comby.dev/docs/overview
https://github.com/comby-tools/comby

Strange loops and programming - meta level

http://sheep.art.pl/Strange Loops and Programming

Leaning toothpick syndrome

When a quoted expression becomes unreadable because it contains a large number of escape characters, usually backslashes (“\”), to avoid delimiter collision
m/ftp:\/\/[^\/]*\/pub\//
https://wikipedia.org/wiki/Leaning_toothpick_syndrome

How to implement a programming language in JavaScript

https://lisperator.net/pltut

Best websites for programmers

https://github.com/sdmg15/Best-websites-a-programmer-should-visit

A Bestiary of single-file implementations of programming languages

Programming languages are amazing, they turn our words, numbers, and symbols into the bits that make a machine do things.
But it’s easy to get overwhelmed when implementing a programming language.
Luckily, some smart people have distilled the most interesting parts of programming languages into implementations that fit in a single source code file:
https://github.com/marcpaq/b1fipl

Rant: Modern software development is cancer = modern software development can be summed thusly: let’s solve a problem that does not exist

Kids fresh out of university - or college - may be impressed by this brave new world of chaos and programming languages, but at the end of the day, it’s about the user
When I go to a restaurant, I don’t want to know what the staff is doing with my food. I’m paying for the service and ignorance. And I expect the same from software. I’m paying, I’m the boss. It’s time the software industry started serving its boss, the user.
https://dedoimedo.com/computers/software-development-cancer.html

Programmers are confessing their coding sins to protest a broken job interview process

“Whiteboard” interviews are widely hated. They also discriminate against people who are already underrepresented in the field:
https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process

‘They’ll squash you like a bug’: how Silicon Valley keeps a lid on leakers

Working for a tech company may sound like all fun and ping-pong, but behind the facade is a ruthless code of secrecy and retribution for those who break it
https://theguardian.com/technology/2018/mar/16/silicon-valley-internal-work-spying-surveillance-leakers

How one programmer broke the internet by deleting a tiny piece of code

https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code

I’ve just liberated my modules. The note I posted about unpublishing modules from NPM, by Azer Koçulu:
https://kodfabrik.com/journal/i-ve-just-liberated-my-modules

Briliant!! Source code poetry!!

https://sourcecodepoetry.com

Learning

The Hacker Way: How I taught my nephew to program
https://stopa.io/post/246

Awesome computer history: A curated list of computer history videos, documentaries and related folklore:
https://github.com/watson/awesome-computer-history

Curated list of movies every hacker & cyberpunk must watch:
https://hackermovie.club
https://github.com/k4m4/movies-for-hackers

Curated list of awesome Hacking tutorials, tools and resources:
https://github.com/carpedm20/awesome-hacking

Papers from the computer science community to read and discuss:
https://paperswelove.org
https://github.com/papers-we-love/papers-we-love

Curated list of cryptography papers, articles, tutorials and howtos;
https://github.com/pFarb/awesome-crypto-papers

Path to a free self-taught education in Computer Science:
https://github.com/ossu/computer-science

Understanding Compilers - for humans - part 1 & 2
https://medium.com/@CanHasCommunism/understanding-compilers-for-humans-ba970e045877
https://towardsdatascience.com/understanding-compilers-for-humans-version-2-157f0edb02dd

Lean testing or why unit tests are worse than you think
https://blog.usejournal.com/lean-testing-or-why-unit-tests-are-worse-than-you-think-b6500139a009
https://blog.kentcdodds.com/write-tests-not-too-many-mostly-integration-5e8c7fff591c

What are some things that only someone who has been programming 20-50 years would know? by John Byrd:
https://quora.com/What-are-some-things-that-only-someone-who-has-been-programming-20-50-years-would-know/answer/John-Byrd-2

Programming: a classical book, should know about it:
https://wikipedia.org/wiki/The_Mythical_Man-Month

How to implement a PL: the token input stream
How to implement a programming language (tutorial for beginners)

Wiki

×