Monday, July 23, 2018

Enterprise vs. Indie Software Development

Back in my enterprise development days. The company that I was working at acquired another company. One of the senior engineers that was inheriting the new code base remarked how ugly the code was.

Another time as a junior engineer for a different company, I was required to dig into some legacy code from the founding days of the company. I couldn’t believe how poor the code was as I struggled to understand it.

I’m convinced that Mark Zuckerberg’s original code for Facebook had to be terrible and I’m sure that if he showed it to enterprise developers he would be laughed at. However, I’m also convinced that both the enterprise developers and the solo founders are doing the correct thing.

And that’s what I’d like to talk about today; the difference between enterprise software development and Indie software development. I’ve recently switched from the enterprise world to the indie world so it’s been something on my mind. Both require you to sit down and crank out code. You drink coffee. Sit in front of a computer and code away. But they are far from the same and if you neglect the differences, it can really hinder you.

What does enterprise development look like?


In the enterprise development world, even before any code is written there is bunch of stuff that needs to happen first. You might start with working with Product Managers to flush through the project details and then come up with a technical design document. This should address all the use cases. Then you’d present this to the product managers as well as other technical stakeholders on other teams. This document may go through some iterations. Many different use cases and error conditions get flushed out here. Then the work gets chunked up into pieces, estimated, and prioritized. Finally they are assigned to the developers.

The technologies that are chosen are well known in the industry to be the most reliable and can scale well under load.

The result is code that is clear and readable. Code is written for readability so that other engineers stumbling over it could easily understand it. Methods that are too large are broken down into smaller methods. Code is never allowed to be copy and pasted. Common code is refactored into a common library that can be shared. Unit tests and integration tests are written. It is important to have proper code coverage so that the team can quickly detect if future changes break it. There is a mandatory code review where other engineers scrutinized the changes.

What does indie development look like?


For indie hacking, I come up with an idea and nail down an mvp with just a couple sentences. I come up with a sketch of what the UI is supposed to look like. I get started on it as soon as possible. The code works but is not polished at all. I ship before some of the features are complete and while there are still known bugs in some parts of the code.

Why is this so?


In the enterprise development world you work on a much larger team so much of the code you read is optimized to be readable. The code is expected to live a long time and other people will be working in the same code base. As a technical lead, often the main effort is on the communication side of making sure stakeholders are on the same page. The company has been around for awhile, the business has already been validated. Maybe the specific feature you are working on might get killed but the company is invested in getting it out right and still has money to pay you even if it doesn’t. This means that although you are expected to work fast, speed is not the most important priority. In fact for many (arguably poorly led) enterprise companies, it becomes more about writing code than the product since the engineers can be far removed from the customers. You get paid for the code. Your bonuses may depend on how good your code is in code reviews and if your code

On the flip side, indie developer has so many unknowns. You often have no idea if the business is even viable when you write your first line of code. The more validation you do the better but you run into the chicken and the egg problem. The customer doesn’t really know what they want until they see it. Or people say they want a certain product but in reality won’t end up paying for it. Thus you want to get something out as soon as possible so you start getting feedback. Sometimes that just means throwing up a landing page without having a real product to get signups. If you can do things without writing any code, even better. But don’t do what a ton of developers starting out do and write code for a year and then end up finding out that noone wants their product. That means fast feedback loops are a top priority. You need to take shortcuts in order to get something in front of someone so you can start . This means the code is working but not super polished and not refactored a million times. For indie developers, it becomes all about the product. The code takes a backseat.

Don’t Confuse The Two


Both enterprise and indie developers are acting rationally. If you don’t have any customers it would be a major mistake to spend so much effort polishing up the code and spending too much time working on useless features that the customer doesn’t care about. There is probably a high likelihood that you will end up throwing all of that MVP code away.

On the flip side if you are an enterprise developer, you probably have a large number of customer and a large number of developers. Thus the code you are expected to write will likely need to be scalable, robust, and well written right out of the gate.

As Peter Levels mentions, the rules are different. Enterprise has its set of rules and solo making has its set of rules. Mistakes are made when the wrong rules are applied to the wrong game; the indie developer that spends too much time to make the codebase perfect and never ships or the enterprise developer that writes working code quickly but unreadable by his teammates. In the end it’s all about figuring out what is important for the game you are playing and optimizing for that.

Monday, July 16, 2018

How I decided to quit my job


I mentioned in my last article that I quit my job to become an solo maker. There’s likely a lot of people who dream of doing so. So I wanted to go a little more in depth in this decision and explain the reasons behind it and why it made sense for me.

WHY QUIT YOUR JOB?


I remember not long ago I was working a pretty stressful job. After I got home and had dinner it was already pretty dark. Its not like I had too much energy to do anything even if I could. My mind was already mush from the workday and I was exhausted. Looking back if I really had put my mind to it I could probably have overcome and gotten work done on my side project. Many entrepreneurs do this. But I didn’t have the discipline. Poor discipline and a poor environment means no progress. Instead most of my activities (reading, drinking with friends, relaxing) were to enjoy a momentary escape and recover from the workday.

In addition, the tides were changing at the company. There was a change in management, the community broke down and the people who I shed blood and sweat with started leaving. My rate of growth slowed down a lot. Although I made good money there I realized that it would be really dangerous to stay. What do I mean by dangerous?

DANGEROUS VS SCARY


On NPR’s How I Built This Podcast, Jim Koch, the founder of Sam Adams talks about the difference between scary vs. dangerous. Many things that are scary to us are not dangerous. Oppositely, many things that are dangerous are not scary.

He gives the example that repelling off of a cliff is scary but you are held by a belay rope which could hold up a car. Therefore it is not really dangerous. Things like walking near a snow mountain when the weather heats up probably isn’t scary, but is really dangerous as it could cause an avalanche. Not wearing sunscreen out to the beach may not be scary, but dangerous.

Jim then explains that him staying at Boston Consulting Group would not be scary but would be very dangerous as one day when he is 65 he’d look back at his life and see that he wasted it by not doing something that made him happy.

And I felt the same way. I looked at the other people further down the path that I was on. I didn’t like what I saw. Sure, if I kept the path, I might get promoted a few times and make a pretty decent salary and have a cushy job. Others might call it successful, but I would know that it wasn’t. It was a safe choice but one of regrets for me. I came to the conclusion that although staying at my job didn’t look scary, it was dangerous.

Whenever something is scary, we should also ask if it is dangerous. If not, then don’t be afraid to take the leap. Quitting my job sure looked scary, but was it really dangerous? I truly believe that it is not dangerous.

I should clarify. This is not universal advice to quit your job. I’m saying that for me at that time, it was right. Why do I say that? Because I had started to build up the discipline. I actually took a couple weeks off using my holiday hours in order to test this theory. I wanted to see how I would respond. Would I sit around and watch NetFlix or would I be productive. The result is actually not as important as the work ethic. All I wanted to see was myself actively taking steps towards my goal. I actually surprised myself on how focused I was. I loved the freedom. So that’s how I knew it was time to go.
"At 29, walking away from data processing, I was terrified. [...] 6 years at a job I felt stuck in. Maybe I was afraid of change.
The world might say you are not allowed to yet. I waited a long time out in the world before I gave myself permission to fail. Please, don’t even bother asking, don’t bother telling the world you are ready. Show it. Do it." — Peter Dinklage, Game of Thrones actor.
The most successful people in life are able to take calculated risks. They are great at capping the downsides. What are the downsides here? That I’ll never get a job again? I’m sure I’d struggle in the competitive market, but I do already have 10 years of software development experience including management, plus I’d have a papertrail of a bunch of projects that I worked on and unique skillet that would set me apart. I’d argue that I’d be MORE antifragile than my peers. Lost opportunity cost and income? The real risk would be to NOT pursue a dream lifestyle of mine. The money is nice but what would I want to spend it on? I’d want to spend it on quitting my job.

In the end I believe if you have the discipline to work, and you have the drive to learn, and you have the confidence to get back up after hitting obstacles. You’ll end up accomplishing your goal.
But that’s not all. There’s another very important thing you need before you quit your job.

MONEY IS YOUR LIFELINE


What is the thing that you want do most in life? Its probably not your job. But we spend most of our time at our job? Why is that? Well its probably so we can have enough money to pay for basic things that we need as well as little luxuries. There’s nothing wrong with that. But if instead you dream of something else. And you want the freedom to pursue it, then you need to think of money in a different way.
“We buy things we don’t need with money we don’t have to impress people we don’t like.” — Dave Ramsey
Thus if your priority is to pursue something else, you may need to adjust how you spend your money(life energy) to optimize for that. Sometimes we fail to see the connection between us having to work to pay for our expenses; if we could limit our expenses we could limit the work. The more runway you can build for yourself the higher your chance of success. You will be less stressed and give yourself more at bats and learning opportunities. Good luck!

---

I want to point out that this is not the norm for entrepreneurs wanting to do a startup. I am speaking more to those who are on the fence. If you aren’t mentally committed to your dream, don’t do it. If you have a family or mortgage and don’t have the runway yet, don’t do it. It can take time to create the right situation for you. If you carefully examine your situation and find fear but not true danger, then don’t be afraid to take a leap.

Wednesday, July 4, 2018

Tip: Manage Label Specific Gmail Notifications on Your Android Mobile

Ok here's the situation. I get a decent amount of email. We all get a decent amount of email. Most of it is not worth being distracted by. We want to be doing deep, valuable work and not get interrupted every 5 minutes from some company trying to sell you something. Other times its things that are important, but not urgent and it can wait for later. Our attention is valuable and others should not have a direct line of communication to interrupt us as they please. But some of the email is very important. Some of it is very beneficial to us. In this case, we choose to be notified.

That's what I wanted. I wanted to only get notified for specific emails. Other emails should not beep, buzz, or blink my phone. Also, I want this to be configurable on just my mobile phone.

So how do I do this? The first time I checked it wasn't possible. I have an Android phone and use the Inbox app.. Inbox does have a way to manage filters Inbox doesn't have a way to customize messages based on label.

I was actually planning on building something specifically for this. Maybe it would be my next project in my 12 projects in 12 months challenge. However, I found a way to do this without needing to write any code. Here's how you do it.

You need to use a combination of Gmail AND Inbox.

 So let's say that I am looking for a travel deal and sign up for Scott's Cheap Flights. Scott sends out an email whenever there is a travel deal. Since these are time sensitive, its best to get notified right away so I can quickly check if it is to a place of my liking and book.

So the first thing to do is for me to create a label for Scott's Cheap Flights. For this I need to use Inbox.


Pull up an existing email from Scott and there will be a pulldown on the top right. Select "Create new..."






It will ask you if you always want to add any future emails from Scott to this label. Hit confirm


You can configure this label here:



Settings > Email > Label settings and notifications
I would recommend having "Skip the inbox" on. Its time sensitive but not really something you want to see again in your inbox if you miss out.

Ok. So you are done creating the label. How do you get notified?

The Gmail app has the ability to to set messaging specific to a label.



 Settings > (email address) > Manage labels > (label name). From here you can check label notifications. You can even set a label specific Sound.

For this to be useful, I would also recommend going to your Inbox label (in Gmail app under the Manage labels setting) and disabling label notifications as well as notifications in your Inbox app. Otherwise you would still be notified for all incoming email.

That's it. And all of this can be done on the fly with your mobile phone.

So I decided to not build the app myself and just went with this solution. It is a bit annoying to have both Gmail and Inbox installed but I can live with it. Also, it would be lovely if Inbox supported editing filters to get a little more drill down into labels. For example you can use your filter to detect keywords so you can have a scotts cheap flights + for Bali label. You can still do this via the Gmail web interface but it would probably require you to get on your laptop.

Hope this helps anyone else out there who prefers to not be distracted by every single email and only on the good stuff ;)

Sunday, July 1, 2018

New Linux Mint + Xfce install

I got a new laptop. A 12 inch Lenovo Thinkpad x240. Specs? i7, 256 ssd, 8gb ram.  It was used off eBay but it is pretty spotless. I love these machines, the build quality is so nice. I recently even discovered that all X and T series are mil-spec. Perfect size and durability for my upcoming travels. All this was $180+$20 shipping. I don't think there is really anything that is comparable (12 inch ultrabook) at a similar price point in the market today. You can't compare those cheap plastic Acers to this. The major downside is the screen as it is 768p. However, I've already ordered a new FHD screen replacement for $84.

I just did a complete OS install and I kept track of most of what I did.

Install OS

Linux Mint 18.3 "Sarah" + Xfce. Downloaded from main page, used USB Image Writer from another Linux install to create a bootable USB drive.

disable Touchpoint - I don't use it at all.
Touchpad disable when typing.

ZSH

install zsh:  sudo apt-get install zsh
install oh my zsh: run curl command in https://github.com/robbyrussell/oh-my-zsh

create new .zshrc
---
export JAVA_HOME=/usr/local/android-studio/jre/
export PATH="$JAVA_HOME/bin/:$PATH"
export VISUAL=vim.tiny
export EDITOR="$VISUAL"
---


Setup the hosts file:
-------
# alias my git server
192.168.0.111 raspberrypi

#   block some sites that I waste time on such as
0.0.0.0 espn.com www.espn.com

# Take the hosts file from this url and append it to the bottom. This blocks a lot of mal/tracking sites
#http://winhelp2002.mvps.org/hosts.htm
-------

install chrome and login. Install various chrome plugins like LastPass.

install git
create sandbox directory,
   clone what you need...
   git clone git@raspberrypi:/home/git/custom-morning-journal.git

Configure git:
git config --global user.email
git config --global user.name
git config --global push.default simple

sudo chown username:username -R /usr/local

install sublime text 3
http://docs.sublimetext.info/en/latest/getting_started/install.html#ubuntu
(follow the commands there but sometimes the version isn't the latest so go to the main page and use the latest version)

install PackageControl
install Material Theme (and add recommended settings)

{
"always_show_minimap_viewport": true,
"auto_complete_selector": "source, text",
"auto_match_enabled": false,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_face": "Fira Code",
"font_options":
[
"gray_antialias",
"subpixel_antialias"
],
"font_size": 9,
"ignored_packages":
[
"Vintage"
],
"indent_guide_options":
[
"draw_normal",
"draw_active"
],
"line_padding_bottom": 3,
"line_padding_top": 3,
"margin": 0,
"overlay_scroll_bars": "enabled",
"tab_size": 2,
"theme": "Material-Theme-Darker.sublime-theme",
"translate_tabs_to_spaces": true,
"update_check": false
}

Other SublimeText packages to install

Package Control
GitGutter
HTML-CSS-JS Prettify
SidebarEnhancements
SublimeCodeIntel
SublimeLinter

requires node js: https://nodejs.org/en/download/package-manager/

SublimeLinter-jshint

// SublimeLinter Settings - User
{
   "paths": {
        "linux": [ "/usr/local/node_modules/jshint/bin/"],
        "osx": [],
        "windows": []
    },
}

Install Android Studio. Don't forget to bump up the xmx

Install java jdk 8

SSD compatibility. Run through steps in:
   https://sites.google.com/site/easylinuxtipsproject/ssd

Xfce Theme


https://github.com/horst3180/arc-theme
Manually build.
Once built go to these menus to set to the correct theme
Appearance
Window manager
Lightdm greeter settings

Xfce config:
install docky for xfce
Set to autohide, use glass appearance
Add Chrome, Sublime, Thunar to dock.

install sensors plugin: xfce4-sensors-plugin
install network monitor plugin: xfce-netload-plugin

Dropbox

Install dropbox, fix icon:
https://www.dropboxforum.com/t5/Installation-and-desktop-app/in-linux-mint-xfce-dropbox-doesn-t-show-system-tray/td-p/155775
go to sesson and startup through menu and delete existing dropbox startup option.
Create a new startup option with command:

dbus-launch dropbox start

Google Pinyin

fcitx
fcitx-config-gtk
fcitx-frontend-gtk2
fcitx-frontend-gtk3
fcitx-googlepinyin
fcitx-ui-classic

From Input Method menu install Traditional Chinese
Then add Google Pinyin in Fctix Configuration menu.

Its a lot of work to get everything installed but a lot of fun. And as I use it for my main laptop I'm sure I'll find so many apps and settings that I'm forgetting.

Here's the result so far: