top | item 12273704

Ask HN: What are the cool life hacks for Developer?

71 points| user7878 | 9 years ago | reply

What are the cool life hacks for Developer, you are applying in day to day life?

67 comments

order
[+] aculver|9 years ago|reply
Being a developer is a certified superpower, so it's fair to expect that some of the life hacks unlocked by being a developer are on a life changing scale. Here's my recommendation:

Build a machine that prints money.

Find a problem that regular business computer users are solving with some combination of raw effort and a spreadsheet to keep track. Write an app that accomplishes the same thing, but better, and in a mostly automated fashion, and charge them monthly for access to your tool.

It's a lot of work upfront, but the gains you make each month compound. Most of the customers you sign up this month will still be customers next month and you don't have to resell them. Instead you focus on selling new customers, who themselves will be around the month after that. Eventually, the amount of money the machine prints each month is greater than the effort you're putting into it each month, and you've freed yourself from exchanging time for money.

In terms of life hacks that are particularly attainable for developers specifically, I think starting a SaaS is near the top.

[+] muflax|9 years ago|reply
How do you discover problems that regular people have?

Especially because what most businesses actually do on a daily basis, and what annoying problems they have, is totally invisible to me.

[+] cyberferret|9 years ago|reply
Have another, totally unrelated to coding (or even computer) passion nearby to your work desk that you can go to in order to reboot your brain from time to time.

I have my collection of guitars behind my work desk, and every time I am waiting for a download or process to run, I force myself to NOT just open another browser tab for Facebook/Youtube or revisit my emails and instead reach for an instrument and take my brain to another place for a short while by playing something or practicing some scales/modes.

I also do this when I start feeling overwhelmed with to-do tasks or debugging tricky code. Forcing my brain to think about something completely different and then coming back prevents burnout for me and makes me come back to problems with a different mindset.

Never mind if it is a musical instrument, your cat, card tricks, painting - whatever. Take a mental break.

[+] singingfish|9 years ago|reply
At one point I was picking up my soprano sax during test runs on a regular basis. Doesn't work so well in an open plan office mind you :)
[+] puzzles|9 years ago|reply
Great advice. I started building quadcopters recently, and it's been great to combine technology with 'manual labor'. I've never been into DIY stuff before, but it's tons of fun!
[+] geocar|9 years ago|reply
Go outside.

It's not just important to actually enjoy the life you're trying to hack together, it's also healthier, and if neither of those reasons will convince you, it'll also make you a better programmer: Too many programmers think they need to get in front of a screen to start "programming", when in actuality they're just spending themselves, and responding to what they see. Only thinking about the problem fully will make your programs smaller and faster.

[+] collyw|9 years ago|reply
Totally agree, and this is party why I hate coding tests for interviews. Writing good code starts with decent understanding of the problem and thought put into the design. Rushing that for some time limit is completely counterproductive.
[+] mobiuscog|9 years ago|reply
Walking - clear your head and don't think about anything technical - for at least 30 minutes, preferable more.
[+] roryisok|9 years ago|reply
+1 - I think about a problem so much better when I'm away from my PC, usually when I'm out walking or driving somewhere.
[+] chx|9 years ago|reply
Twenty minutes. http://www.businessinsider.com/the-first-20-minutes-after-wo... this is amazing.

Elevate your command line game:

autojump https://github.com/wting/autojump

ag https://github.com/ggreer/the_silver_searcher

Use zsh and put this in .zshrc https://gist.github.com/chx/f9509cb2db6595be334ca2404fac8a91

Now you can jump to directories freely with just j afewcharactersfromthedirname, search their contents with ag super fast and if you ever figured out something on the command line, you can recall it after this. For example, I remember I was searching dangling commits with awk so I do Ctrl+Rgit*awk and there it is. (I posted this particular command to http://stackoverflow.com/questions/21903972/search-for-strin... but that's less relevant to the topic here so I won't repeat here.)

[+] poppingtonic|9 years ago|reply
Use this perl project called TagTime <https://github.com/dreeves/TagTime> to track your own time. Description from GitHub: To determine how you spend your time, TagTime literally randomly samples you. At random times it pops up and asks what you're doing right at that moment. You answer with tags.

Use Beeminder <beeminder.com>, a commitment device with a sting. Make a commitment, and give them a price (in USD) for failing to meet that commitment. They take your money if you don't do what you said you'd do. They have APIs for many services such as RescueTime and TagTime, and an Android app.

Note: If you're the kind of smart person who always finds a way out of doing the things you claim to care about, then if these two tools don't get you to do those things, you'll at least think deeply about, and know if you really cared about them.

You either get value (success in the things you care about), or information (learn what you don't care about, that you thought you cared about). Then you can use the value of that information to reorder your preferences in an optimal way.

[+] roryisok|9 years ago|reply
Use a clipboard manager. I wish I'd started this a lot earlier in life. The amount of times you need the second last thing you copied is surprising. I went through a few before I settled on Ditto, which works over remote desktop too.
[+] dovdov|9 years ago|reply
This! It's a life changer! I use ClipMenu on mac.
[+] Gurrewe|9 years ago|reply
Yes! I would recommend to use the clipboard manager in Alfred if you are on a mac.
[+] kol|9 years ago|reply
I use Diodon on Ubuntu.
[+] asimuvPR|9 years ago|reply
Automate your job. I'm steadily building tools that make my job easier and thus me more efficient. I have a nice django app scaffolding generator that makes writing code quicker. I just need to add the model fields and the logic to the views. Everything else is mostly generated. In fact, I'm moving towards automating a lot of the code I write. Less strain on my hands.
[+] stephengillie|9 years ago|reply
I made a set of Powershell functions to automate making Powershell script modules, and adding functions to those, and adding items to functions. At some point, this became a natural language to Powershell interpreter, adding in brackets and other punctuation at the correct locations - it has the side effect that human error is not introduced, in brackets (5% error rate) and also human error in comments (20% error rate).

I feel like this is where all languages will eventually go, being easier to hear and speak instead of read and type. And not having to think about brackets and semicolons frees a developer to think instead about the work their code is performing.

[+] bkovacev|9 years ago|reply
Would you mind sharing the github repo?
[+] roryisok|9 years ago|reply
AutoHotKey: if you're on windows like me (and starting to feel in the minority on here), this is a must. I've been evangelising AHK for the last 7 years at least, to anyone who will listen. It has saved me days of my life in accumulated time. Here are a few samples of things from my main script which I use daily

    CTRL+@ - paste my email address. saves buckets of time logging into things, signing up to things etc

    ]t - paste date-time in the format 2016-08-12 09:53 
    ]d - paste date in the format Friday, August 12, 2016

    #ho - open windows hosts file in notepad

    ALT+MOUSEWHEEL - page up, down with each movement

    F11 - switch to thumbnail view in explorer
    SHIFT-F11 - switch to detail view in explorer
I also have a universal autocorrect script which I've filled with common typos so I can't type 'pulbic', 'widnows', 'anywya' etc (had to disable the script to type those in here)

On top of this, an autocomplete / intellisense script for html / js dev.

Chocolatey: Apt-get for windows. If you ever need to install anything, you can open a web-browser, google the thing you want, open the page, find the installer, download it, open explorer, find the exe, run it, step through the options and get on with your day. OR, if you have Chocolatey installed you can just open powershell and type "choco install vlc" or whatever it is, silently.

The best feature of choco is that you can chain things together. You can write a script that installs everything you need in life, and have a new machine up and running in no-time.

Synergy+: If you use more than one machine, you can share the mouse, keyboard and clipboard - even across operating systems. Put the two screens side by side, configure, and they might aswell be one machine with two monitors.

[+] irunbackwards|9 years ago|reply
Love Chocolatey, also Synergy+ is awesome, especially since it's cross platform.
[+] wingerlang|9 years ago|reply
Automation. My number one thing might be learning to use multiple cursors in Sublime, I probably jump into it 10 times a day to psuedo-automate text editing. I wrote of one example here: http://jontelang.com/blog/2016/06/22/sublime-efficiency.html

Another thing is, also automation, to use Hazel to automatically keep my temp files manageable. Basically, when I file is older than X days, move it to a "need review" folder. This mean that there is a steady but very very manageable flow of files to delete or move to their correct location. I also wrote about it here: http://jontelang.com/blog/2015/08/17/hazel-is-great.html. My Downloads folder have not been 1000s of files since I started with this.

[+] floSchr|9 years ago|reply
Yes! I use a similar hazel workflow for screenshots. I save all Screenshots to ~/Pictures/Screenshots Screenshots older than 1 days get moved into a ./.old directory Screenshots older than 1 week in that backup directory get deleted.

Workflow: http://jmp.sh/QAEQSep

[+] ff_|9 years ago|reply
+1!

Instead of using Hazel I directly set an "rm -rf ~/Downloads/*" at every restart. This way I only save files when I really move them instead of having them pile up there.

Funny fact: at some point it was mounted in ram, but I couldn't download files larger than half of the ram. :D

[+] hieupham|9 years ago|reply
Learn 1 new thing. Talk more with girlfriend or family. Help 1 guy who is younger. Answer 1 question on Stackoverflow/Quora. Blog 1 short article. Try to code a little better. Read a chapter in a book. Think about what we did today, how to improve tomorrow => Life is happiness, follow our heart and live better every day
[+] nanospeck|9 years ago|reply
Start asking questions in Stack Overflow. I wish I started doing this years ago. I used to be just a non participating reader for a long time. Once I got the taste of it, I ask questions frequently now. If you are stuck with an issue for over 2 hrs, ask in SO. There are so many knowledgeable people who will guide you to in the right path and save you hours/days! The best part is you'll get a response when you are back after coffee or max on the next day morning when I come to work. I've started trying the same thing in HN as well lately :) .
[+] joegreen|9 years ago|reply
Well, I don't have similar experiences with SO. Sometimes I feel that easy questions are being answered very quickly by many people because everyone wants to get reputation points quickly, but difficult questions are often left unanswered forever as they require a lot of effort and don't bring as much reputation to the answerer (as their potential audience is not so wide).
[+] greenspot|9 years ago|reply
Nobody mentions 'meet women' [1]. Maybe too simple but from my perspective an important part in this equation.

Meeting women is a bit like doing sales. it's more of an outgoing activity and being extrovert. So rather the contrary of coding. This is refreshing, gives me balance and a nice change to my day to day life as a coder.

[1] For the sake of verbal simplicity, I use the term 'women' for people of the opposite gender or the gender you are into. And also for the sake of simplicity and decency, I use 'meet' for all kind of interactions.

[+] roryisok|9 years ago|reply
or 'meet men', if you happen to BE a woman, and / or are not into women.

While I appreciate that finding a partner in life is very important, I don't know if it really falls under the umbrella of "developer life hack".

[+] wetwiper|9 years ago|reply
I think the idea is rather: get up off your chair, move away from your screen, and interact with other people. Or dont interact (your choice), but do something that takes your mind off a problem and simultaneously off the "work" aspect.

More to the point (at least in my case) is to ensure that your priorities remain ordered correctly. Basically, ensure that you spend sufficient time with family, friends or others, and make time for hobbies that don't involve code. Time management is important in this regard... committed to providing 8 hours a day? Stick strictly to that. Your own personal project? Define a time restriction on the hours spent on that project, and keep strictly to it. You soon realize how much time those distractions during the day take up. By reducing those, your productivity increases. But importantly, relationships become stronger and those hobbies help expand your mind. Both are extremely beneficial to you and your growth as a developer...

[+] roryisok|9 years ago|reply
Use DuckDuckGo as your default search engine. It answers your code questions inline! It seems to do this by scraping the first accepted answer from the first stackoverflow post match to your query.
[+] gabemart|9 years ago|reply
If you're not already, use browser shortcuts when you know where you want to go.

A few weeks ago I read about an American civilian pilot who was out on a training flight and by chance ran into the Japanese air fleet over Pearl Harbour - becoming one of the first Americans to learn of the imminent attack. I don't remember any details beyond that. If I wanted to read about that pilot on wikipedia, I guess I could navigate to Google.com, enter some relevant search terms, scroll through the results until I find one from Wikipedia that looks right, click on on, read it, see if it's the correct one, etc.

But because I search for wikipedia articles about stuff all the time, I have a chrome shortcut set up that does a Google "I'm feeling lucky" search with "inurl:en.wikipedia" appended to it, so I just type in my browser bar

    w civilian pilot first to see japanese air fleet
and hit enter, and it takes me straight to https://en.wikipedia.org/wiki/Cornelia_Fort

Once you get used to going straight to where you want to go, using the "search and choose" method becomes painfully frustrating

Edit: to be more clear, I have a chrome "custom search engine" set up with the keyword "w" and url:

    http://www.google.com/search?ie=UTF-8&q=inurl:en.wikipedia %s&btnI=745
this obviously routes your wikipedia navigation through google, which some people may have a privacy issue with, but I don't when it's something I would search google for anyway
[+] eswat|9 years ago|reply
Having worked mostly on refactoring projects in the last few years, I've learned that too many projects end up in the gutter because "that's just the way it is" was the mindset of too many developers working on them when they faced resistance like tight deadlines or faced with spaghetti code they didn't want to deal with.

Applying to real-life, this means making excuses for goals or habits you want to achieve, instead of finding clever solutions to meet them.

Example: you want to develop a habit of listening to podcasts or audiobooks. But excuses like "I don't have a commute with dead time to listen to them" or "I can't focus if I listen to while I work" pop up. You could just say to yourself "that's just the way it is" and not bother developing the habit. Or you can push through the resistance, get creative and figure out other ways to make the time for the habit. Personally as I don't have a commute to work and can't listen while I work, I listen in pockets of time like when I'm in the shower or going in-between meetings.

[+] andretti1977|9 years ago|reply
I do love bushcraft! I'm especially passionated with fire-starting techniques and adore to practice them in the woods, but when i can't go outside i watch a lot of youtube related videos.

I had also started a small website (http://bushcraftvideos.woodsandrocks.com/) to "collect" the best of them a few months ago but i'm facing a "break" due to work and personal commitments.

Starting a fire (small and safely) in the nature using a knife and a firesteel is an inspirational experience!

[+] Artoemius|9 years ago|reply
Use Workflowy to manage everything in your life that needs to be in a list (https://workflowy.com/)

If you are on Chrome, use Tabs Outliner to manage your tabs (https://chrome.google.com/webstore/detail/tabs-outliner/eggk...)

[+] roryisok|9 years ago|reply
Workflowy is a great tool, but I had to give it up because I spent half my day curating lists instead of working ;-)
[+] miguelrochefort|9 years ago|reply
Workflowy is awesome. Kind of like Org-mode for the web.
[+] SeriousM|9 years ago|reply
Automate! I use LinqPad (.net,c#) to write small tools that automate daily tasks or help me looking up information that I need more than three times a week.