Hacker News new | comments | show | ask | jobs | submit login
Ask HN: What are the cool life hacks for Developer?
71 points by user7878 on Aug 12, 2016 | hide | past | web | favorite | 67 comments
What are the cool life hacks for Developer, you are applying in day to day life?



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.


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.


Great Idea!


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.


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 :)


Nothing works very well in an open plan office :-).


LOL - this is one of the benefits of working remotely from home that I have, I guess... When really frustrated, I can crank the amp to 11... Bonus is that during the working day, most of my neighbours are out at work/school, so nil complaints... ;)


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!


That sounds awesome. I started indoor climbing... nothing like coming back to your keyboard and you can't feel your fingers.

Although this doesn't really work for a quick 15 minute break, and only if there is a climbing gym/wall nearby.

Otherwise Ukulele!


I really want to do that. My soldering / electronics skills are non existent though. I build lego


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.


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.


Walking - clear your head and don't think about anything technical - for at least 30 minutes, preferable more.


+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.


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.)


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.


Beeminder sounds like a great idea, but there's something stopping me from using it. Every time I try to set a new goal on Beeminder just before I set the dollar amount I hear myself say "this is really stupid" and promptly cancel.

I know that if I feel guilty about paying those $5 per transgression I can just lie to the app, which makes the whole thing pointless.

I understand that the whole idea is to be honest to yourself. But because I have been frugal/cheap my entire life, it feels stupid to waste $5 when I could easily avoid it.


(I'm a Beeminder cofounder) This is good feedback; thank you! We're mostly ok with targeting the particular psychology that this kind of thing works for (our very self-serving characterization thereof: http://blog.beeminder.com/typebee ) but what about adding enough social accountability that you wouldn't cheat? We don't have many social features but you can just point some friends/family at the url of your Beeminder graph.

Or maybe a better answer is to automate the data entry (we have dozens of integrations -- GitHub, Trello, Fitbit, RescueTime, etc) so that you'd have to do more than lie to the app. With enough effort you could still cheat, of course.

Would love to hear if this is overcomeable or a dealbreaker!


Thank you for your reply.

I think social accountability would only work if (1) someone else could tell whether I'm cheating (that's not happening in a personal project) and (2) cares enough to check my graph.

Maybe my cheapness trumps my integrity. Or more positively, I reframe the meaning of the price: what does $5 buy me in Beeminder? an accurate data point. Is $5 worth an accurate data point? depends on what I'm planning on doing with the data later. And because I don't know what I want to do with the data, an accurate data point doesn't seem very valuable.

That's really unfair, though. I know that losing those $5 eventually will coax me into complying, but my inner Hyde will convince me to lie. Sigh.

I guess I just don't fall into the target niche (although it really looks like I do—except for the cheapness-trumping-integrity issue).


It's not just $5 for an accurate data point; it's $5 to convince yourself that the commitment to the goal is really real. Betting for free is very different to betting for real money.


Hi, dreeves! The Complice integration is the best thing yet! I'm wondering how many other kinds of such services can be added like this.


We're working on making it nice and streamlined to add them! So, lots, we hope! Let us know what you think we should add next.


Push the responsibility one step away from yourself. Since the goal needs data from you, then you can connect the goal to something like github, RescueTime, TagTime, Complice, etc. Or design your own service for your own personal needs [please do this if nothing exists]. Example with GitHub: if, to lie to Beeminder through GitHub, you have to make a fake commit, push and pull request, then you're already part of the way to doing what you want! Just s/"fake commit"/"what you actually want to accomplish", and as they say, Bob's your uncle.


Ha, you said this much better than me! Thanks!


You can use Day One as well for the "random sampling". I've got it setup so that it pops up from the menu bar each X time and prompts me to add what I'm doing.

Some months are almost full, some months have only a handful of info. But it is quite stable since all the way back to 2014 for me.

You could add both tags and paragraphs of what you're doing.


Haven't really got some myself, but I read this article a while a go https://github.com/NARKOZ/hacker-scripts. This guy's script to make coffee is pure genious ;-)


Thanks for the link! I've seen this before but couldn't remember where!


Wow this is pretty nice, thanks


osam!


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.


This! It's a life changer! I use ClipMenu on mac.


Yes! I would recommend to use the clipboard manager in Alfred if you are on a mac.


ArsClip[1] for Windows is a fantastic free tool to track clipboard history.

[1] http://www.joejoesoft.com/vcms/97/


That was one of the first I tried, but I think it didn't work across RDP


I use Diodon on Ubuntu.


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.


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.


Would you mind sharing the github repo?


I'm in the process of automating some tools. They should be out soon. I'll make sure to do a Show HN post for people like you who are interested. :)


Please let me know :) I'd love to see it and play around with those tools, they'll cut my work time tremendously. Thank you!


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.


Love Chocolatey, also Synergy+ is awesome, especially since it's cross platform.


interesting. Useful tools


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.


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


+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


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


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 :) .


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).


That's what the bounties are for.


Yes for questions with very less audience, you can offer a a bounty after a limited duration (3 days if I remember). You will have to give away your points as bounty. If you do not have enough points to give away, sign-up on other Stack Overflow affiliate sites that give you 100 point for every sign-up. And give it out as bounty.


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.


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".


What they are saying doesn't have anything to do with romance.


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...


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.


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


Interesting idea. Also, DuckDuckGo can do the same:

  https://duckduckgo.com/?q=%21ducky+inurl%3Aen.wikipedia+%s
I also use Google's "I'm feeling lucky" as my default search so I can type e.g. "mdn array" to look up the JS array docs quickly. I used to use DuckDuckGo's version but the results were unfortunately too inaccurate.


Someone on HN mentioned (or even built) http://mdn.io for that, so you can just type mdn.io/array into the address bar and it takes you straight to the right JS docs page.

Bonus: works in every browser or environment.


I really like this "I'm feeling kind of lucky" feature that Google search used to ship with Firefox and that still works:

http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navc...

It goes straight to the first result if the result is very good, otherwise shows you the search results.


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.


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!


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...)


Workflowy is a great tool, but I had to give it up because I spent half my day curating lists instead of working ;-)


Workflowy is awesome. Kind of like Org-mode for the web.


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.


cool




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: