Zip Bomb - <AUTHOR> http://en.wikipedia.org/wiki/Zip_bomb

<comment><USER2> I found a similar file to this (a zip file that contains itself) and e-mailed it to a friend at work. He never received it, but I thought nothing of it (I assumed the email filters just destroyed it).

A days later the mail server stops working and the sysadmin turns up at my desk. Turns out the anti-virus scanner had been unzipping and scanning repeatedly. It eventually filled up the entire disk and bad things happened.

<comment><USER3> That reminds me of an incident when I was in year 8: seeing how deeply nested I could get directories on Windows. H:\a\a\a\a\\..., eventually it stopped working. (I played the game with my friend... he went for creating a new directory at each level, after a little I became sensible and went for copying and pasting, thus multiplying the depth by two each level which of course achieves the goal pretty quickly - so I won by a considerable margin.)

The school IT manager (who, incidentally, apart from this once I was always on good terms with) was rather annoyed at me the next day, for the nightly backup had fallen over the previous night and he had found the problem. You see, what to me was H:\ was \\\galaxy\users$\chrism, which on that server was D:\users\chrism. So that 256-or-so character path became longer than 256 characters on the server and the backup software hadn't been written carefully enough to cope with what was a perfectly valid NTFS path, but not a valid path for the normal Win32 API function calls.

How was I to know it would do that?

<comment><USER4> One of many examples of why Windows's arbitrary path length restriction is ridiculous.

<comment><USER5> Most UNIX systems have a PATH_MAX. It's not just Windows.

<comment><USER6> PATH_MAX is defined but meaningless on both Linux and OS X.

<comment><USER7> Unfortunately, this is not true. The OS X kernel can't deal with paths longer than MAXPATHLEN, which is defined as 1024.

</comment></comment></comment></comment></comment></comment><comment><USER8> I've seen something similar with a PNG file for user supplied profile image [1]. The image was a 10000x10000 all black PNG image which compresses to a pretty small file size.

Unless you validate the image dimensions as well as the file size it may cause problems, for instance when GD is used to try to resize it exhausted the memory limit.

[1] <https://bugs.launchpad.net/mahara/+bug/784978>

<comment><USER9> Out of curiosity I just made two images:

15,000 x 15,000: <http://i.imgur.com/WzCyE.png>

50,000 x 50,000: <http://i.imgur.com/kgmHu.png>

Both FF and Chrome refuse to open the second one. IE does something weird. Both Opera and Safari figure out the size correctly, but don't display the image.

<comment><USER10> In case safari crashes and you won't be able to open it, sudo rm -rf ~/Library/Caches/com.apple.Safari did it for me.

</comment></comment></comment><comment><USER11> Here are some other compression curiosities:

(<http://www.maximumcompression.com/compression_fun.php>)

It includes a 115 byte rar file that expands to 5 Mb. (That 115 bytes can be squashed down further; one compressor gets it to 39 bytes.); a file that compresses with one software but ends up bigger with another software; etc.

some say that file compression is linked to AI - good general purpose compression relies on being able to predict the text and create table; if you can predict something you understand it.

The Hutter prize tests this against the 100 Mb of enwiki8. Best attempt so far is a bit less than 16 Mb.

(<http://prize.hutter1.net/>) I remember zip bombs from early 90s BBSing. I also remember ANSI bombs.

<comment><USER12> Very relevant: [https://en.wikipedia.org/wiki/Kolmogorov_complexity#Incomput...](https://en.wikipedia.org/wiki/Kolmogorov_complexity#Incomputability_of_Kolmogorov_complexity)

<comment><USER11> > _By definition, the Kolmogorov complexity K of a string x is defined as the > length of the shortest program (self-extracting archive) computing x. K(x) > itself cannot be computed, only approximated from above, namely by finding > better and better compressions, but even if we reach K(x) will never know > whether we have done so. For a text string like enwik8, Shannon's estimate > suggests that enwik8 should be compressible down to 12MB._

The current record is 15,949,688 bytes.

</comment></comment></comment><comment><USER13> See also Russ Cox's "Zip Files All The Way Down" article:

<http://research.swtch.com/zip>

</comment><comment><USER14> Even more impressive: A zip file that extracts to itself. (That's also shown in the article, as a kind of "Lempel-Ziv quine".)

</comment><comment><USER15> I similar attack to mess up XML parsers:

<http://en.wikipedia.org/wiki/Billion_laughs>

<comment><USER16> lol ^ 10,000,000,000

<comment><USER17> lol * 10,000,000,000

lol ^ 10,000,000,000 is an insane amount larger. :)

</comment></comment></comment><comment><USER18> Considering the nature of modern "art" (ex.: "here's a hard drive containing $5M in stolen software!"), and owning a "This T-Shirt is a Munition" (featuring the then-controversial RSA-in-4-lines-PERL code), I'm perversely inclined to find such a "zip bomb" small enough to print the hex or QR code on one business card. The 42kb file is a bit big; any known smaller versions?

<comment><USER11> (<http://www.maximumcompression.com/compression_fun.php>)

This has a 115 byte RAR file that expands to 5 Mb. You can probably experiment to get a file just small enough for QR code, with huge output.

(Note that using obscure compressor gives a 24 byte file that expends to 5 Mb.)

</comment></comment><comment><USER19> You can also use the same technique to cause a exhaustion on the number of files/inodes. Ie you format a ext4 partition with crazy number of inodes, then create the zip file containing crazy amount of 0-byte files. Then receiving side has a normal formatted ext3,ext4 partition. Exhaustion on number of inodes. This is not nice so don't do it.

<comment><USER20> Wonder what would happen if you hid a symlink pointing to root as one of the files. Someone without a doubt would rm-rf.

<comment><USER21> rm -rf doesn't follow symlinks:

        /tmp $ mkdir -p a/b/c
        /tmp $ mkdir -p a/d/e
        /tmp $ cd a/b/c
        /tmp/a/b/c $ ln -s /tmp/a/d .
        /tmp/a/b/c $ cd ../../
        /tmp/a $ ls */*
        b/c:
        d

        d/e:
        /tmp/a $ rm -rf b
        /tmp/a $ ls
        d

It would be pretty stupid for it to.

</comment></comment></comment><comment><USER22> Detection of compression bimbs has improved alot as apposed to over 10 years ago when they realy did cause problems on mail servers. Home AV software detects them, crazily enough my install of GoLang on a windows box has a file that gets flagged as a compression bomb every full system scan.

But examples like this happen in many forms, heck windows on some file types/sizes doing thumbnails has done wonderous things like exponentialy growing the swap file to a ever impending churned slowdown.

Even computers have mental farts.

<comment><USER23> > crazily enough my install of GoLang on a windows box has a file that gets > flagged as a compression bomb every full system scan.

This may have something to do with Russ Cox's blog post on recursive zip- archives "Zip Files All The Way Down" in Go: <http://research.swtch.com/zip>

Baseless speculation mode: There is a possibility that the recursive zip file was part of the Go test cases for the gzip package at some point. If it lingers in the mercurial commit history, it may still trigger hits from your AV software.

<comment><USER22> I just had to dig out my logs and see what it was - file in question is located in (default install):

C:\Go\src\pkg\regexp\testdata\re2-exhaustive.txt.bz2 385KB in size though opening shows a .txt file that is 58MB in size. Basicily Avast being picky and a non-positive. Probably so crompessed that it hit whatever limit on decompressing per file in avast and avast then things its a compression bomb. Opens and extracts fine, though hardly fun reading.

</comment></comment></comment><comment><USER24> Web browsers support compressed data, I wonder will they try to decompress something like this?

<comment><USER25> Yes they will, there was a post a while back which used this to bomb the browser.

<comment><USER26> Perhaps more concerning is being able to use this to launch a denial of service attack on a server that accepts zipped data. Gzipped requests are unusual with HTTP (no idea how widespread support for it is), but iirc SPDY is compressed by default.

<comment><USER27> Maybe not at the transport or protocol level, but it wouldn't be too hard to DoS an application server that handles compressed data, such as images.

Make a billion-pixel PNG image that compresses very well, upload several copies simultaneously to a LAMP server running on an average Linode, and watch it run out of memory while trying to create thumbnails with GD.

<comment><USER28> PHP usually has a pretty reasonable memory limit set, so it would puke on itself pretty quickly.

But I don't think you'd bring the site down.

<comment><USER27> Fair enough, but I've been on Linode's forums long enough to have seen dozens of people running 50 PHP processes with 128MB memory limit each, on a 1GB server shared with MySQL and a bunch of other crap. (It seems that 128MB is the new "reasonable memory limit" these days, since that's how much RAM it takes for PHP to handle photos from 8-to-12-megapixel cameras and smartphones.)

</comment></comment></comment></comment></comment></comment><comment><USER29> The most authoritative-looking reference

[http://www.aerasec.de/security/advisories/decompression- bomb...](http://www.aerasec.de/security/advisories/decompression-bomb- vulnerability.html)

in this typically thinly referenced Wikipedia article looks to be several years old. What is the current state of the art? Some of the comments already posted as I post this comment talk about the situation "years ago" and at least one comment suggests that this is largely a solved problem, currently. How many wild vulnerabilities like this are there, really?

(I ask questions like this about most "facts" reported in Wikipedia articles, because I am a Wikipedian myself, and I have become painfully aware of how often the "the free encyclopedia that anyone can edit" becomes "the encyclopedia in which every fact is just made up.") From a neutral point of view, is this really much of a problem in day-by-day computer use and online network use?

<comment><USER30> This seems like a ripe opportunity for an enterprising blogger to examine changes that have been made to how we compress things over the past few years and see if any of these changes impacts the potency of the decompression bomb as a kind of, as you said, 'update to the current state of the art'.

</comment></comment><comment><USER31> Comp sci folks: Is predicting whether a compressed file will produce a finite (or, better, reasonably-sized) output roughly equivalent to the halting problem?

<comment><USER32> It depends on the decompression algorithm. It's possible for that to be the case, but this can only happen if the compressed binary format is essentially a Turing-complete language, for which your decompresser is the interpreter.

I'm not aware of any data formats for which that is the case, but from a theoretical standpoint, _eval(s)_ is a perfectly cromulent decompression algorithm. This fact is essentially the starting point for Kolmogorov complexity.

"Reasonably-sized" is actually an interesting problem in itself. If your decompresser is sufficiently advanced, you could embed a busy-beaver function, which terminates but grows faster than any computable function. I have no idea whether such functions could be expressed with less-than-Turing-complete data formats.

<comment><USER33> RAR has a built in virtual machine for forwards compatibility with new compression algorithms.

</comment></comment></comment><comment><USER34> While this is out of the range of most consumers, I wonder if any bored sysadmins with a new storage system to test have tried unzipping that file...

<comment><USER35> It'd be easier to do something like cat /dev/urandom > big

<comment><USER36> /dev/zero is probably faster

<comment><USER37> It is way faster (at least with dd):

      $ time dd if=/dev/zero of=10MB.dat  bs=1M  count=10

      real    0m0.213s

      $ time dd if=/dev/urandom of=10MB.dat  bs=1M  count=10

      real    0m8.873s

<comment><USER38> Or if you want to measure the speed of the source itself:

      $ dd if=/dev/zero of=/dev/null bs=1M count=100
      104857600 bytes (105 MB) copied, 0.0237114 s, 4.4 GB/s

      $ dd if=/dev/urandom of=/dev/null bs=1M count=100
      104857600 bytes (105 MB) copied, 21.501 s, 4.9 MB/s

Also dammit Ubuntu with your Gibis.

</comment></comment></comment></comment></comment><comment><USER39> Welcome to 1988?

</comment><comment><USER40> Old as fuck.

<comment><USER41> >Old as fuck.

So is algebra, and yet, every year millions of people learn it for the first time.

<comment><USER42> But they don't immediately rush out to tell the world the "News"

<comment><USER43> Yes they do. Every child that learns anything will tell the world about it - or at the very least everyone in their family.

</comment></comment></comment></comment><comment><USER44> Inception

</comment><comment><USER45> Awesome link, but already seen it on reddit yesterday. HUH</comment>


Ask News.YC: Finding office space? - <AUTHOR>

<comment><AUTHOR> I'm looking to find office space for my startup. Here's what I'm looking for:

\- Around 200 sq ft (enough for 2 ppl) with door that closes

\- Quiet location, window preffered

\- Built in internet access

\- In the Bay Area, preferably near Palo Alto

If you have tips/pointers on where I should look (good websites, classifieds, etc.), things to watch out for, and just anything at all that may not be obvious to a newbie such as myself, I'd really appreciate it.

</comment><comment><USER2> Somebody here was organizing such a place.

</comment><comment><USER3> Craigslist is a good place to start.</comment>


Ask HN: What's the easiest way to unblock Hotspot on the iPhone? - <AUTHOR> I have AirVoice Mobile carrier SIM card with iPhone 6s. AV blocks Hotspot feature for some reason. Is there any hack without rooting of the Phone to get it enabled? <comment><USER2> The answer may be specific to the carrier, so I would suggest adding the carrier to the title.</comment>


Why do we have blood types? - <AUTHOR> http://mosaicscience.com/story/why-do-we-have-blood-types <comment><USER2> Based on the pathogen hypothesis at the end of the article, it seems to me that diversity in blood type itself could be the key benefit to a species here.

</comment><comment><USER3> Some scientific data re. various cancers and their correlation with ABO groups:

[http://ispub.com/IJPA/13/1/5982](http://ispub.com/IJPA/13/1/5982)</comment>


Tips for programming outside - <AUTHOR> Because it is summer. How do you do it? I've tried laptops with both matte and glossy screens and the reflections makes it impossible to read anything from them. Even when I'm sitting in the shade. <comment><USER2> Maybe add "Ask HN" to the title?

Anyway, I use a light background in my text editor on bright sunny days. I haven't found one I'm in love with yet but it certainly makes things more legible.

<comment><AUTHOR> Oh, I forgot that. And now it's to late.</comment></comment>


Google flushes heat from data center with toilet water - <AUTHOR> http://arstechnica.com/tech-policy/news/2012/03/google-flushes-heat-from-data-center-with-toilet-water.ars <comment><USER2> Wow, what is up with data center news? I mean seriously.

I joke with folks who think running a datacenter is 'exciting' its like watching grass grow, except its dark and their is no grass. Maybe I should blog about this stuff, but at social events it seems impossible to maintain a conversation about apex cooling vs planar cooling vs directed airflow or conduction, or 208 three phase vs 120 single phase vs DC. Perhaps I go to the wrong types of parties :-)

<comment><USER3> In secondary school, I had a chance to visit a supercomputer center with a Cray Y-MP (like this one: <http://planetromero.com/2010/01/gametales-cray- ymp>). Turns out it's just a big cabinet. Hooked up to other big cabinets. Oh, and when you sat down at a login terminal, it was just a Unix box. Coolest thing about it was the attached bench (Cool! I sat on a supercomputer! Hmm. Not very comfy.)

 _sigh_

From the outside, the datacenter is an inaccessible realm of high technology, carefully engineered to maximize various important features. From the inside, it's cabinets and wiring and plumbing.

<comment><USER4> Except the Barcelona Supercomputer Centre, in a church...

<http://degiorgi.math.hr/~vsego/phun/beautiful_supercomputer/>

</comment></comment></comment><comment><USER5> Here's a youtube video about the system: <http://www.youtube.com/watch?v=lJnlgM1yEU0>

Basically they're taking pre-treated water from the city sewage plant and running it through their own mini-treatment plant to a level that allows them to use it in their cooling system. They do mention filtration & sterilization from chlorine, so I am wondering really how much different the cooling water is compared to potable drinking water.

The water they're getting from the sewage treatment plant is definitely not raw toilet water. I imagine Google is getting a big discount by treating their own water.

<comment><USER6> Sewage waste tends to have high amounts of pharmaceuticals excreted in urine, which are hard to filter but biodegrade. I wouldn't drink the Google water it, but it probably has no immediate toxicity.

Google must treat the water with chlorine, because of risks like Legionnaires' disease.

</comment></comment><comment><USER7> Wouldn't the dirty water clog the pipe? Via mineral deposits etc?

<comment><USER8> In the video, they say that the water is filtered and chlorinated before going into the cooling system.

</comment></comment><comment><USER9> I am wondering if this water circulates within their datacenter going through some cooling system or they have constant stream connected to community water pipe? Can someone explain? e.g. how big might be daily consumption of this facility? is there serious "green" difference of its mostly PR trick?

<comment><USER10> I'm not sure exactly how much water these data-centers use, but it's huge enough that Microsoft built a water treatment plant next to its DC in Quincy, WA, which it now leases back to the city for $10/year in exchange for reduced water rates. In that scenario the water is reused by treating at each stage between the fruit processors, the data center and the city.

[http://blogs.technet.com/b/msdatacenters/archive/2011/10/13/...](http://blogs.technet.com/b/msdatacenters/archive/2011/10/13/microsoft- s-data-center-takes-fresh-approach-on-water-reuse.aspx)

</comment></comment><comment><USER11> It occurs to me that one way to save power would be to specifically design your servers to operate at significantly higher temperature, that way cooling is much cheaper and less power intensive.

<comment><USER12> Very true, search for "server inlet temperature" if you want to learn more.

</comment></comment><comment><USER13> This is not as green as it sounds.

This area of the united states suffers from huge water shortages, and the river they are using is a major source of water for Atlanta (I'm not sure if they are upsteam or down from Atlanta).

As a result by the time the river flows out of Georgia into Alabama and Florida it is very diminished. This makes those states pretty upset since they also want to use the water.

So what does Google do? They evaporate the water! What a waste.

Water cooling is not really a very clean thing in this part of the country.

I would like to see some numbers: How much energy does it cost to desalinate the amount of water they are wasting? If it's more than the energy they are saving then they do not have a net win.

<comment><USER14> " _So what does Google do? They evaporate the water! What a waste._ "

Quite literally a drop in the bucket. The back of my envelope has too much written on it at the moment, but if you look at the total water flow in that watershed and multiply it by the heat of vapoization of water you _get a staggeringly large energy flow_. There's no way; absolutely no way at all a few megawatts of server heating would be measurable at all. None.

<comment><USER15> 1 megawatt * 1 hour = 3,600,000,000 joules Water takes 2,257,000 joules / kg to evaporate Which works out to ~1,600 kg or 422 gallons of water per hour per MW.

However, I don't think they actually want to evaporate all that much water which leaves a lot of residue issues and instead focus on heating a much larger volume of water.

PS: The article is also wrong in that they don't directly cool hot air from their servers with this water. They are cooling air heated by there cooling system and depending on how hot the air from there servers are they may simply vent that if it's warmer than the outside air.

<comment><USER14> Heh, the gauntlet has been thrown, so I need to show numbers too.

I see that Atlanta rainfall is about 48" (122cm) a year.

422 gallons * 24 * 365 (* 3.785 litres/gallon) * 100 cc/L == 1.4e9 cc/year.

So converting to rainfall area: 1.4e9cc/122cm = 1148 m^2

Basically a 100' square catch basin on the roof of the building would provide all the water they need. Noise.

<comment><USER16> > Basically a 100' square catch basin on the roof of the building would > provide all the water they need. Noise.

Which raises the question: Why don't they just do that? I'd imagine it would be less effort to process, and even though you do need to have a buffer against low rainfall periods, water is one of the easiest things to store.

</comment></comment></comment></comment></comment><comment><USER17> Google Please... Facebook has been pumping loads of shit through it's data centers for years!

</comment><comment><USER18> High five to google for a green solution!

<comment><USER18> not sarcasm folks--unless people dont like green solutions???

</comment></comment><comment><USER19> THAT explains a lot!!!

</comment><comment><USER20> 2 google datacenter articles in as many days, both including quotes from the chief of DC ops? why the big PR push all of a sudden from what's normally a quiet division?

i'm guessing google has a big datacenter PR disaster that they think is going to leak soon, or else Mr Kava is looking for a raise.

<comment><USER21> I think it's more that it's technically kind of interesting, and keeping them in the press (which is cheap) lets them recruit more easily (across all infrastructure, not just datacenter ops), and more importantly, retain staff.

"Green Google" also is a halo for the company overall, and might be heading off negative press about how Google alone uses more electrical power than all the households in (several lightly populated states, chosen to mislead).

</comment></comment><comment><USER22> It took a lot of convincing to get them to switch from using Brawndo: The Thirst Mutilator.</comment>


Teen hacker found bugs in school software that exposed millions of records - <AUTHOR> https://www.wired.com/story/teen-hacker-school-software-blackboard-follett/ <comment><AUTHOR> > common web bugs in Blackboard's Community Engagement software and Follett's > Student Information System, including so-called SQL-injection and cross- > site-scripting vulnerabilities

About 5,000 schools, about 5,000,000 records of students, faculty, staff. The teen had some difficulty getting anyone at the companies to accept disclosure.</comment>


Embedding Blobs in Binaries - <AUTHOR> http://gareus.org/wiki/embedding_resources_in_executables

<comment><USER2> I'm personally very fond of the decade-old no-brainer solution that is bin2c[0]: convert a binary to a humongous .c file with an array literal. It's inefficient, and a bit stupid with source control, but it's entirely fool proof. Every compiler eats it. It just works. You compile it just once to a .o and then it doesn't slow down your build anymore.

If you just want the damn file in your executable and then move on with the stuff that actually matters, bin2c is a godsend.

[0] one of the many implementations appears to be on [https://github.com/gwilymk/bin2c](https://github.com/gwilymk/bin2c)

</comment><comment><USER3> From the C Include method part: " On the downside, it requires at least five times the size of the original data (" 0xNN," for every original data-byte) "

Can anyone explain this? In the example he shows, the tool produces an array of 12 bytes, the exact same size as the input file.

<comment><USER4> Perhaps he means encoding the data as ascii in the source is 5 times bigger than the original (i.e. 0xNN,), though I don't see why you have to write the data in the form 0xNN. Presumably you could just use a giant string, encoding non-ASCII characters.

<comment><USER5> You then need to escape characters that aren't legal in C string literals (such as double quotes, newlines and nul), and that's a lot more work than just converting the whole string. Also, string literals add a trailing nul byte, which is easy enough to deal with, but is also easy to forget about.

<comment><USER6> I'm lazy and typically just base64 it ;)

</comment></comment></comment></comment><comment><USER7> char data[] __attribute__((section(".my1337hax0r.hidden.section")));

<comment><USER8> Nice, thanks.</comment></comment>


Finishing a side project - <AUTHOR> https://hugozap.com/posts/how-to-finish-your-side-project/ <comment><USER4> One thing I learnt in a thread on HN a long time ago and that I use a lot to just keep working on side projects : Make sure you stop half way through a sentence / line of code.

Don't finish that article, or don't stop with code that compiles.

The reason is stupid simple : It just removes all the blockers of starting working on the project again. It removes the initial step, which is usually the hardest. Come in, finish that function and make it compile. Boum, now you're in the flow just keep going :).

Also, it's ok to stop side projects if they're not fun any more. Stop beating yourself :). You most likely learnt in the process, which was the original goal.

EDIT : Not meant to be taken as a silver bullet at all! Just a small trick to keep a 'live thread' between you and the project.

<comment><USER5> This only works if you can remember what you stopped in the middle of. I often come back to projects with no idea what I was last doing, so now I've got some half-finished bit to figure out rather than something that could be clearly understood.

<comment><USER6> Parent's tip works best if you're coming back the next day so that you can easily reload the mental context you were in. If you know there will be more time before you return, you generally need to write yourself notes that are reasonably detailed to allow you to recover that context. In which case the trick may not be worth it.

</comment></comment></comment><comment><USER7> If you need to go to a café and create a new user for each new side project, you're not gonna work a lot. I understand needing separate contexts for separate projects but this seems like overkill. The context is in your mind, not your environment.

I have my share of past and ongoing side projects, including hobby websites [1], funny tutorials [2], an ebook [2], coding references [4] and a CSS framework [5].

Like the blog says, the motivation is always here at the start. It's the second part, when this motivation fades, that is hard. What you need is discipline. I work from home so discipline is key, even in my professional work. How you acquire it is through time management: you need to dedicate time to a project. I do this through predefined 2-hour slots each day or week where I have to work on a project. That way I don't have an endless timeframe in my kind (because endless would mean "this is never be finished") and provides me a repeatable and reproducible pattern. And by scheduling it in advance, it provides me with a plan to look forward too, and not end up sitting in front of my computer during a break and asking myself "What should I do now?".

[1]: [https://f1standings.com](https://f1standings.com)

[2]: [https://jgthms.com/web-design-in-4-minutes/](https://jgthms.com/web- design-in-4-minutes/)

[3]: [https://jgthms.com/css-in-44-minutes-ebook/](https://jgthms.com/css- in-44-minutes-ebook/)

[4]: [https://cssreference.io/](https://cssreference.io/)

[5]: [https://bulma.io/](https://bulma.io/)

<comment><USER8> Great that works for you, but your argument sounds akin to asking why someone couldn't score high on the exam when you did. Different people, different motivations. I relate more to the OP than you. Just saying "be disciplined" doesn't help. This isn't the army, it's a voluntary side project I want to do when I can be watching Netflix.

<comment><USER7> I don't think it's fair to believe I'm just saying "Be disciplined" when I explain how to manage your time.

I do watch Netflix too. But it's time boxed during the day, the same way working on projects is. And in a day, I don't work more than 6 hours. I'm always done by 6pm and can do anything in the evening. The key is to manage your time during the day and stick to a plan.

As a matter of fact, OP's rules feel more like the army to me: having a different user or even laptop for a project, going to a different location, blocking websites like reddit… These are harder restrictions. If I really want to quit a project, I always _can_. I just need to close my code editor and my terminal. But in my mindset I don't _want_ to. Because the project is not a burden like the army: it's 2-hour slots where I'm focused, not overwhelmed, and I know there's an end to it.

The door to leave is always open but I don't want to take it. It's different.

<comment><USER9> That's interesting. I saw once Timothy Feriss interviewing Neil Gaiman, and it was about focus and whatnot, and Gaiman said: "whenever I'm blocked, I stop, and start doing _nothing_. I can't watch a movie, read a book, I do nothing. I have only two options: I work or I do nothing - I cannot do anything else. After a little while, things get really boring, and I think 'might as well go back to work' \- and that works as a charm.".

I guess that's a very good way of setting your focus straight, to obey your commands, instead of the other way around.

<comment><USER8> I used to do that technique for studying for the GRE. And it worked like a charm for sure (aside: Barron's GRE word list had the word <n-word>dly as meaning lazy in 2007 still. I was a kid in India but even to me it sounded wrong). Neil's full time work is to write. I'm sure this is what he does 9-5 or whenever he writes profesdionally. I doubt he just sits without doing nothing in the weekend when he could be playing with his kids. Thats the issue. If I was demotivated to do this in my day job that's one thing. Motivating yourself for extra work is where it's hard.

</comment></comment></comment></comment></comment><comment><USER10> I find that the best way for me to finish a side project (for some definition of "finish") is to work on something that I want to use. Sometimes my motivation will flag for a few months until I want to use it; then the motivation kicks in and I'm productive while I improve/fix the project to make it work better for me.

<comment><USER11> Relatedly, it's about working on something that will be useful quickly and you can polish after you're already using it every day.

E.g. I got really fed up with how clunky the AWS assume-role workflow was at work with multiple AWS accounts so I wrote a little tool using Lispworks's CAPI for a GUI that would handle authentication and embed a webkit browser so I could control the cookies more precisely. I got an MVP that improved my workflow working in a weekend and I've been iterating on it over the last several months. I find this sort of process works much better than spending months working on something that I may eventually use.

<comment><USER11> I've also just decided that it's ok to have a dozen incomplete projects I work on occasionally over the course of several years.

<comment><USER12> I'm in the same boat but the problem with that approach is the technology stack and/or the problem the project solves become obsolete in the meantime.

<comment><USER11> It's a matter of picking slow-changing technologies: so, not the latest JS framework or whatever, but something like Clojure or Common Lisp that has a track record of maintaining backwards compatibility. And then learn to solve problems in ways that can easily be adapted to solve related problems.

</comment></comment></comment></comment></comment><comment><USER13> Someone once told me: don't talk about your idea to others until you're done building it and have something to show (at least an MVP). Surprising how motivating this was for me to finish my projects even if they're not perfect.

That way you don't mentally feel like you're accomplishing things by just texting the idea around. The discussion bloats your senses and conflates self- reassurance with getting things done.

And secondly, sometimes its easier to communicate an idea by building it than to try to use words to describe your intangible hallucinations. Translation from your head to words to someone else's head is pretty lossy (esp on things like Twitter, though I do think its a great creative exercise)

They say the difference between a vision and a hallucination is that other ppl can see a vision (h/t Ben Horowitz). But no matter what, everyone can see cold hard product.

<comment><USER14> Totally agree. When you explain your idea, you "live" in it, giving you a false sense as if future is already here and you achieved what you want. You get your portion of positive emotions without doing any work, so every next idea you do more talking and less walking.

Don't do it, keep it to yourself until there is something tangible to show.

</comment></comment><comment><USER15> One brainhack I like to use on myself is to think of them as "Side Quests!" rather than "Side Projects."

My main quest is my day-to-day life. When I'm feeling bored, bogged down, and tired of the daily grind -- I head out in search of a side quest.

A side quest can be easy (1 hour), or hard (14 days). But the goal of a side quest is to distract me from my daily grind, and help keep me learning and motivated.

While this difference in perspective is subtle, I feel like it's enough to give me the headspace to stay more deeply engaged with interesting topics I'm trying to learn or understand.

I wrote a related blog post last week on related thoughts, if you're interested: [https://jakedahn.com/2020/06/23/its-not-a-side-project- its-a...](https://jakedahn.com/2020/06/23/its-not-a-side-project-its-a-side- quest/)

<comment><USER15> Also noteworthy: for me it feels like any time a "side project" turns into a "side hustle" \-- the ideas usually fizzle out very quickly.

Sometimes it's worth remembering that side projects can be "just for fun", and it's okay if you're going to spend a few dollars on it. The value can come from the learning process, and creative input/output generated.

</comment></comment><comment><USER16> I don't finish 95% of my side projects and that is OK. Most side projects start because I have some interesting problem in my head that I want to solve and then I start obsessively solving it for a few days until it is solved or...until the next problem comes along and I lose all interest in the first problem.

I read Refuse to Choose by Barabara Sher because someone recommended it here on HN and it showed me that I am a scanner always looking for new problems to solve and the act of working on an interesting problem is what makes me tick, not the finishing of an actual project or product.

Usually I learn a thing or 2 by starting and working on a side project that I can use in my day to day freelance work. And sometimes when the planets align the interesting problem I am obsessing over is that bug I need to solve for a client and the satisfaction is double. Working on an interesting problem and making the client happy.

</comment><comment><USER17> Motivation = what you think about in the shower [http://paulgraham.com/top.html](http://paulgraham.com/top.html)

The question seems to be how to keep your project top of mind. Once you're forced to stop working on your project, the context file this post mentions acts like a save point to return your project to top of mind.

I'm sure there are other similar hacks. Maybe review your context file before showering each day?

</comment><comment><USER18> Hmm, why is it so important to "finish" a side project? Can it not be something that you work on whenever you have time, for many years? As long as there are users, software projects are rarely "finished" completely.

I just released the first public version of my first real side project [1] and I don't expect it to be "finished" for years. I have so many ideas for the domain and I am sure new users will bring continued input. Are there popular examples for successful side projects like this?

[1] [https://keycombiner.com](https://keycombiner.com) \- a web application to learn and train keyboard shortcuts

</comment><comment> awinter-py > having a "context" log, where you write the current progress, and what to do > next

yup critical. I do this and even if it gives me a 10-minute head start at the beginning of a work session, that means _way more_ successful work sessions in a crazy week

I've started splitting my high-level todo list (tradeoffs + optimization) from my 'stream' todo list (next 5 linear things) -- the latter is useful for context + obstacles.

Writing down obstacles + setbacks also helps here.

<comment><USER19> We are used to put what we have done in git messages. But for WIP commits, it makes sense to also put what to do next. This way git log is your journal.

<comment> awinter-py totally

I've had people get mad at me for 'nextup' comments in commits, but at minimum, given how central git is to our workflow, the commit is the right _time_ to track work

<comment><USER19> There is really no reason to get mad at that, if they want it in the final history, you can always edit it out with rebase when merging on stable.

But I don't see how it hurts.

</comment></comment></comment></comment><comment><USER20> I find the most important thing is that you really want the thing you're building to exist. Everything else is secondary. If you want to use the thing, but can't because it's not there, you'll find time to work on it.

My most successful side project from last year is this climbing community that I built for my wife:

[https://bettybeta.com/](https://bettybeta.com/)

We live in Fontainebleau, France and have arranged our life around the bouldering here, but she had always struggled to find good projects because the climbers who travel here tend to be mostly gym-strong men who power and lank their way through the problems here that suit that style. But there's a ton of other stuff that needs good technique and benefits from being able to bear down on small holds. Women are good at that sort of thing, but there was never a way to find information on those boulder problems.

It made a perfect "Side Project" because the core idea was buildable in a single day, leveraging the same framework I'd used for S3stat, Twiddla, Unwaffle, and the other "Real Business" projects I'd been doing. I was able to avoid silly Javascript build systems and other time-sink pitfalls that normally plague everybody's side projects (presumably because they seem fun and you're trying to learn stuff in addition to building something). The only real "reactive" stuff it needed was in a little "Project Finder" that lets you adjust sliders for grade, popularity, style, climber height, etc. and would benefit from having the list of climbs update in real time:

[https://bettybeta.com/bouldering/projects](https://bettybeta.com/bouldering/projects)

... and that was just a few hundred lines of vue.js, again minus any build system.

I still stick new stuff in regularly (like the "remoteness" filter so that you can find boulders deep in the woods where no plague-carrying-zombies will find you), but since it's built on a polished and time-tested architecture, I can get an awful lot done in a couple hours, so it's just a matter of disappearing off to the office on a rainy saturday morning, then coming back and announcing a few improvements.

Fun stuff.

</comment><comment><USER21> >Unexpected life events.

Like a world-changing pandemic and riots? I'll be honest, it is getting hard to focus on building my cute little software bullshit project when a voice in the back of my head is telling me to spend my time prepping for social collapse.

<comment><USER22> So much more is going on.

Sand storms so large they are blocking the sun in the US.

Radiation forest fires in Russia.

Ufo's existance were confirmed by US navy.

Stock market crash / rapid recovery

What's next...

<comment><USER23> > Ufo's existance were confirmed by US navy.

The way it's written, it sounds like the US Navy confirmed the existence of aliens, but it was just unexplained phenomena, right?

<comment><USER24> It's anything unexplained that isn't on the ground.

I'd bet the most common ones are classified man-made objects. But yeah, nature throws some there as well.

</comment></comment></comment></comment><comment><USER25> Here is some simple advice for sustaining a side project over a long period of time.

1)

Work on it consistently. Ideally, work on it every day. It doesn't have to be a big block of 2 hours each day, browsing through bug reports for 10 minutes can also be enough. But it has to be consistent.

The benefits are:

* It keeps the project fresh in your mind and ready to go. No time wasted on figured out where you were at the start of each session.

* It avoids the that demotivating feeling of guilt that may creep in when you think that you've neglected your project, or once again "started something, but not finished".

* It provides a consistent sense or forward progress which helps generate motivation.

2)

"Motivation" is a resource which needs to be managed. Projects will have a mix of interesting tasks (motivation generating) and dull tasks (motivation consuming) tasks. Be aware of this, and mix these two types of tasks so that you don't bottom out on motivation. Developing some self-knowledge of how you work as a person pays off here too.

Demotivating tasks can also be chipped away at by working on them a little bit per day over a longer period of time. Consistency is the key here too!

</comment><comment><USER26> I've found the #1 trick to finishing a side project is to build it out in the open by writing a blog (or podcast) about it and building up an audience who are interested in seeing you finish it as you go along.

It also gives you an in built audience to launch with who will use it - <USER2> than launching to a loud thud of silence - which sucks and feels like the long dark night of the soul.

<comment><USER27> Then you'll just have a bunch of indie hackers following you. Not the actual customers? Real customers only care about your journey in hindsight. People want to know how Apple etc started, not many will care for journey of a new tech until it's released.

<comment><USER28> That's exactly the reason why the indiehackers website is going circles publishing products which are used within their own audience. If you are building something not targeting this demographic, that's not going to help you get more customers.

<comment><USER26> I think that might be a generalization and likely provably not true (in the larger context of the site).

[https://www.indiehackers.com/products?sorting=highest- revenu...](https://www.indiehackers.com/products?sorting=highest-revenue)

<comment><USER28> You have to click a second time on the revenue for their sort to work but that's clearly what I had in mind when I was saying this.

A lot of the highest revenue products (with a few exceptions of course, I'm not saying it's only that) on this website from this list are SAAS targeted at the startup world.

<comment><USER29> The good old 'sell shovels during the gold rush' trick.

</comment></comment></comment></comment></comment></comment><comment><USER30> In the past five years, I've had several side-projects that were never "finished" in the literal sense, but taught me important things that helped me ace job interviews, getting me two jobs that I probably wouldn't have got otherwise.

At some point I had a mental shift and decided that a side-project that doesn't get finished _but gets me a new job_ is a huge success and not a failure.

This had a big impact in me continuing to explore new personal projects as long as I can learn something interesting from them.

<comment><USER31> That's an interesting data point: personally I've never found side projects to have any effect on getting a job - recruiters and interviewers don't care in the slightest about your side project, Github profile or whatever and will just "follow the script". I just see side projects as interesting for their own sake and a way of learning about things you'll never get the chance to in your day job because it's not in the company's wheelhouse.

<comment><USER30> I should stress that it is not the side-projects themselves that got me the jobs but the knowledge I acquired while working on them.

I usually do side-projects on topics that interests me, and usually apply on jobs that also interests me, and I just hope for the two to converge: at some point the interviewer will ask a question about a technical topic I never worked on professionally, but on which I have intimate knowledge thanks to those side-projects.

And then I'll be able to give an interesting answer while my previous jobs and education would not have prepared me for that question.

<comment><USER31> Sure, I think we're in agreement here. The $dayJob is usually too limited in scope - you can't just drop in, say, GraphQL into a project because you want to learn it (and nor should you). Plus in a large enough company backend devs are kept away from touching frontend code and vice versa. Companies usually don't like to invest in training either so side projects are often the only outlet developers have to learn and explore.

</comment></comment></comment></comment><comment><USER32> I started a lot of side projects like many and didn't finish most. For me the secret of finishing a side project was to start a small one, something that I can finish within a weekend or even less, a few hours.

My completed side projects have been the one that took me less than a week. Some of them was less than 100 lines of code.

</comment><comment><USER33> I've found myself stuck in that endless cycle for years. I find myself highly motivated for the first few weeks, thinking about a future where I can work on this full time. As the project shapes up, I lose interest and start to doubt my idea, wondering why people would ever pay for this. Eventually I work on it less and less until one day I decide to not work on it anymore.

<comment><USER22> It sounds like working on something full time is what motivates you.

To get people to pay for anything is usually a different side project. If you can't see the path to profit no one probably will pay. Find people who will pay and use that as motivation and product guidance.

<comment><USER33> My ultimate goal (like many) is to have a lifestyle business, or at the very least, be able to work full time on my project.

I think thinking that people won't pay for it has more to do with self doubt and lack of confidence in myself.

<comment><USER34> Is it in a state that you could release it? Maybe some feedback might give you motivation or direction to keep going.

<comment><USER33> Some of them were in an almost ready state, just that anxiety kicked in and I would feel too scared to release it.

</comment></comment></comment></comment></comment><comment><USER35> He emphasizes waning motivation as one of they key factors, but there's a logical consequence of this which he didn't point out.

Instead of trying to keep your motivation up, figure out how long your motivation tends to last for (mine is ~2 weeks). Then at the very start of the project ruthlessly cut down the scope to something you think you could actually get done in that time period.

Perhaps this will require you to simplify some of the stuff you were planning to develop

Maybe you'll adopt just one new tool you need to ramp up on instead of five.

But by embracing the ticking motivation deadline you can modify the work you take on to something that you'll actually finish.

I wrote about this just a few days ago, and how I applied this technique to a project I was working on.

[https://twitter.com/ZainRzv/status/1275276323120746498](https://twitter.com/ZainRzv/status/1275276323120746498)

<comment><USER36> Mine is ~2 minutes. Now what?

<comment><USER37> Ruthlessly cut down the scope of the project to what you can achieve in 2 minutes

</comment></comment></comment><comment><USER38> I quite like the idea of a 'context' file that lists what you were doing when you stopped.

I tend to check in code that's broken on purpose with a message: "BROKEN... " and then roughly where the project was.

Also, I tend to check in code with links in the comments to anything I was using so that I can find the links again.

</comment><comment><USER39> I have a side project that I've been working on for more than 2 years already, and it still hasn't reached the point where I'm ready to show it to people.

What I find useful to do when I get stuck with some problem that I don't have the time or the patience to solve, is to leave it alone and just let my subconscious continue digesting the issues. A few days, weeks or months later, the solution would spontaneously reveal itself, and with it new drive and inspiration will fill me, and then I'll dive right back to the work.

I've also had other side projects that I pursued for a while and then abandoned because I had other more pressing or interesting stuff to work on. They're still there on GitHub if I ever feel like revisiting them.

In other words, don't worry about it. Sometimes it fizzles out, sometimes it sustains itself.

</comment><comment><USER40> +1 vote for creating a different system login. This cleaned up my dev environment as I experimented with new tools, and decluttered my brain when I context switch. Not to mention every time I login I am guilted when I choose a different profile to login with.

<comment><USER41> and if you don't want to go that extreme, just using a different virtual desktop can work wonders.

Ironically one of my todos is to hack my xfce to swap out panels (and maybe somehow browser profiles?) when changing to certain named workspaces. So I could have my 'coding' workspace with a panel of work-only applications ready to go, only work-related bookmarks in the browser, etc.

The idea of logging out and in as another user seems to have just a bit too much friction for my tastes, but maybe I should just embrace it.

</comment></comment><comment><USER42> The way I see side project is that they're much like how software engineers in large corporations always have things to do - they're never 'complete'.

Any project but the simplest always keep finding more things I want to add to it.

</comment><comment><USER43> I would say, like in the article small steps, having a clear goal for each session and consistency are crucial to shipping anything. I've been moonlighting on [https://bullish.email](https://bullish.email) for a couple of months following pretty much the rules outlined in the article, 1.5h Monday to Thurs sometimes Friday, and I just shipped a big update on my service. Time will tell if I'll lose motivation, but this is the first time I can manage a day job and a fully functional side project.

</comment><comment><USER44> From my personal experience, it took me years of discipline to build up the skillset to finish a project. It took me years to be able to learn what I can do and what I can't do given a specific timeline and be able to set tangible and achievable goals and focus on that to complete them. (And tangentially, if you ever want to offload your side project, here's a place to submit if you like :) [https://www.sideprojectors.com](https://www.sideprojectors.com))

<comment><USER45> For me it was learning to limit the scope of the projects, each time making it smaller until I planned projects small enough that I could finish them in under 3 months.

</comment></comment><comment><USER46> Personally one of the highest motivators to finish a side project is not doing it alone. My mindset automatically changes from focusing on perfection, to focus on it being viable. It's launched, there's a defined plan to make it work long term. Guess I'm ok with failure if it only affects me (also because it's never a failure, it's training, it's fun...), not if it affects others.

</comment><comment><USER47> I'm glad this person has found something that works for them, but I think there is something far more simple yet harder to track down. None of these "brain hacks" are going to fix the underlying problem of long term motivation. Many have said it's a discipline issue. I disagree. I'm very undisciplined with my gym habit yet I still show up 5-6 times per week. I go very often, but because I want to, not because I'm "forcing myself".

I've been studying how this affects people with ADHD for my book. Everyone I've interviewed concludes in some way or another that there needs to be a far deeper, compelling reason to do something for them top do it long term.

Discipline is just a routine way you develop to execute something. Some people (usually not those with ADHD, I've found) are able to continue riding the wave of discipline until the project is complete, but they are doing so despite wanting to do other things. Is the conclusion that you have to suffer through some unhappiness while "forcing yourself" to complete projects?

</comment><comment><USER48> > Small steps are key

I have been working on NearBeach for nearly 4 years. I have always done it in small steps.

\- Implement projects functionality

\- Implement customer/organisation functionality

\- Implement tasks

\- etc.

I find this helps me keep myself motivated. That and I couple it with a set goal - a very achievable goal.

Currently NearBeach is a minimal viable product currently going through a UI/UX and backend refactoring, with the goal of improving UI/UX and backend readability of the code.

</comment><comment><USER49> My problem is not finishing something. Because the context around a project always evolves, you can't really say it's ever finished. I can (now) easily get to the phase where a project is ready to accept users (which is what I suppose is meant with "finished").

My biggest problem is finding the energy to market the thing/find users outside of the ones I built it for.

I've worked on a tool for product managers (I built it for myself first) that attracts about 5 to 10 users every month (it's free).

I released a tool for a lab manager friend of mine. I wanted it to attract more users than his (enthousiast) staff, but I can't be bothered marketing the thing (except a lame post on LinkedIn).

And so on... Now I'm building a niche appointment planner, hoping I can get other sites to do the user recruitment for me (through affiliate marketing).

So it's never been about getting the project in a state where it's ready to accept user feedback but more about finding the motivation to go and market it.

<comment><USER50> That doesnt sound as a side project but as a main project.

<comment><USER49> Oh, I see what you mean. Maybe it is, indeed.

</comment></comment></comment><comment><USER51> I resonate a lot with this article and I wanted to share a tool I've been working on to help exactly with with context switching. I talked to so many people on how they use their computers - nobody finishes a task in one sitting.

This line perfectly states the reason why context switching is such a drain:

> With the limited amount of mental energy, is crucial to reduce the number of > setup tasks required to do a working session on your project.

Setup is like one of those hidden costs that we take for granted.

Anyways, I built amna, and it's an information manager. It's organized like a to-do list rather than disparate documents. Amna allows you to do research, document compilation and quick app access. I'm not quite done with the website to launch broadly, but this seemed like a great thread to post early on. (open to feedback, and would love to chat if you're interested)

[https://getamna.com](https://getamna.com)

</comment><comment><USER52> Just like when studying or doing homework getting started and setting yourself up is the hardest part. Keep your IDE and relevant tabs open, if you're on Linux set up a workspace for it and just push the rest aside. Once you start tackling some code you'll be in the zone and will probably have to test yourself away from it.

</comment><comment><USER53> Back a few years ago when I first started dabbling in side projects and wanted to grow some side income, I found the greatest motivator was wanting to get out of my day job (which I hated). I wasn't organized and in retrospect nothing was well thought out, but the need to survive and the desire to escape was enough.

</comment><comment> m-i-l I've found that quite simply writing about a side project can be enough to help "finish" it. There's something almost cathartic about the process of writing up and publishing. It isn't about other people reading what you have written, and personally I don't mind if no-one else does actually read it. Rather, it is about gathering your thoughts on your objectives and how it has turned out, documenting it so it is left in a state where it would be a lot easier to pick up at a later date, and that sense of finality or closure (it means that, if nothing else, I at least got it complete enough to write about and also completed the writeup).

</comment><comment><USER54> I love working on endless projects. Releasing something has never been high priority for me. If I get bored then so be it. As long as the journey is fun I'm good.

I love completing things, but I tend to see sub projects/tasks more fun to complete than the entire project.

People are different, but I can totally imagine I would be depressed if releasing something was my goal.

Composing music is similar to me. I've got around 1000 unreleased music ideas with varying degrees of complentess, but I've only released around 50. Interestingly though this viewpoint of not being able to release something was something I mostly saw with people starting out, and eventually it fades.

</comment><comment><USER55> At least for myself, I found it detrimental to set milestones that were based in features. The main reason was I'd rush to finish a feature, get all excited about shipping it in "only 1 week!", then tell myself I deserved a week off. That week turns into a month, then you lose mental context.

What I found key was making it a habit to work on it. Side projects, especially solo ones, take a long time to complete. If working just a little on one is part of your daily habit, you'll have ongoing steady progress that won't come with burnout.

<comment><USER56> I work this way and use this method to help keep me on track: [https://lifehacker.com/jerry-seinfelds-productivity- secret-2...](https://lifehacker.com/jerry-seinfelds-productivity- secret-281626)

<comment><USER57> Ironic, considering that his new Netflix special is mostly material he's been doing for years, but this does sound kind of cool:

> He told me to get a big wall calendar that has a whole year on one page and > hang it on a prominent wall. The next step was to get a big red magic > marker. He said for each day that I do my task of writing, I get to put a > big red X over that day. "After a few days you'll have a chain. Just keep at > it and the chain will grow longer every day. You'll like seeing that chain, > especially when you get a few weeks under your belt. Your only job next is > to not break the chain."

Sounds like the visual commit history on github, now that I think of it. My side project is on a local git, and that's the only thing I miss - <USER3> calendar.

<comment><USER58> Seinfeld denies it: "This is hilarious to me, that somehow I am getting credit for making an X on a calendar with the Seinfeld productivity program. It's the dumbest non-idea that was not mine, but somehow I'm getting credit for it." \- [https://www.reddit.com/r/IAmA/comments/1ujvrg/jerry_seinfeld...](https://www.reddit.com/r/IAmA/comments/1ujvrg/jerry_seinfeld_here_i_will_give_you_an_answer/ceiugt5/)

</comment></comment></comment></comment><comment><USER59> My solution is probably bad advice, but I found effective to commit either financially or to someone so I have to do it, I put myself in a position where I don't a way out other than deliver.

</comment><comment><USER60> Lots of people mentioning tricks and "hacks" that work for them, and seconding techniques from the article, which is helpful.

But after reading a lot of these sorts of articles and threads over the years, the most consistently useful advice that I've seen is simple:

Learn discipline, because motivation will always fade.

It's like getting yourself to exercise regularly, or read at least a half-hour every day. Easy to get started, but even easier to skip a couple of days, then a week, then to stop altogether.

Like they say at Nike: "Just do it."

</comment><comment><USER61> I take my side projects as seriously as if they were major releases.

One of the big reasons that I do them, is because they help me to develop the _habit_ of ship.

Also, one of my side projects has actually become a worldwide standard, so I think that treating all of my projects as "ship" has turned out well.

I have a number of works in progress. Some, I will complete, some, I won't.

 _" We are what we repeatedly do. Excellence, then, is not an act, but a habit."_ -Attributed to some guy that wore a sheet.

</comment><comment><USER62> I've trying these methods and hitting the same motivation wall on my app for the past few months. Managing context and working in small steps is helpful.

A continuous drip or spaced repetition of similar work also helps. Reloading the context of your work can take a lot of mental energy if you've already forgotten where you were. Keeping the context in memory partially reduces the cost of getting started again.

</comment><comment><USER63> One of my tricks is to relax into it. I'm just gonna write some code and get something (anything) done. If it's shit I can "git checkout -- ." and walk away. If I don't get it done it doesn't matter. I need to depressurize it so it feels different to normal work. If something fucks up in prod, do the minimum to fix it, schedule the refactor for "mañana".

</comment><comment><USER64> Do you use some kind of project management tools (kanban,todoist etc) for your side projects or maybe just some plain text todo files? I find that whenever I'm trying to start a new side project I'm spending disproportionately long time searching for perfect tools and often end up doing nothing and agonising over project management instead of working on actual tasks.

</comment><comment><USER65> I used to have trouble doing the work. But when I got honest with myself, I had a very specific problem that was preventing me from doing the work. Once I fixed my problem, I was able to do the work. My side project pays salaries now. "Everyone has at least one big thing that stands in the way of their success; find yours and deal with it" Ray Dalio

<comment><USER66> If you don't mind my asking, what was your problem and how did you fix it? I've been just...stuck for a couple years. :(

</comment></comment><comment><USER67> Like any project. Set quantitative goals and allocate time for it. Find ways to motivate yourself, like imagining the ideal outcomes.

</comment><comment><USER68> Splitting into small chunks is the biggest (ironic) help for me honestly. With kids now, I only have a half hour or so every few weeks I can work on something so I try to make it a nice achievable task I can actually accomplish! Otherwise I seem to just pick up a movie or just read online...

</comment><comment><USER36> Re not sure why, but switching location works: in brain, these things are interconnected and clustered together after some time. Therefore switching the location (and your system user) is a great way to immediately switch your brain to the right context. Great recommendations!

</comment><comment><USER69> I am always motivated to start a side-project to generate some extra income, but then I decide my time is better spent studying for job interviews. Eventually, I get sick of leetcode and go back to working on my side projects. It's a vicious cycle.

<comment><USER52> I think awesome side projects are at least just as valuable as leetcode, and so you should do side projects exclusively unless you have an interview next week.

</comment></comment><comment><USER70> Factor out smaller projects. Try to break up the next step if there is no progress for a while. Separate task definition, implementation and testing into separate steps. If the last project got stuck, try something with a smaller scope.

</comment><comment><USER34> This is really useful.

My motto is make it easy to start but hard to stop. Stopping can be hard when you have built up some momentum and have a clear view of what needs to be done but I think it's good to leave something for tomorrow.

</comment><comment><USER71> +1 for:

\- writing down the ideas after finishing a working session. Besides, I never understood why, but doing that using pen and paper works way better to me. I have an inclination to overthink, which uses being much more exhausting than the actual, productive work itself. Writing the ideas down somehow convinces my brain that they are safe and won't be forgotten, freeing resources for other important things like slowing down and resting;

\- planning for interruptions. Whenever I can, I write a slightly detailed plan containing tasks I have to perform. Not necessarily the steps needed to _finish_ the project: sometimes I just have to learn some fundamentals before I'm able to have a slight idea of where to start. In such cases, I try to define some steps with things I have to learn, tests I have to perform to validate an idea and so on. Planning for the smallest tasks as possible allowed me to cope with interruptions. Sometimes I could simply pick a half- hour task and do something productive while I was waiting for somebody, for instance.

I successfully applied many of the ideas in the article on my masters. After wasting some months being stuck, I could eventually finish everything. A ~15k loc custom application to support a set of experiments + analyzing and interpreting data + writing the dissertation. I feel really proud now for seeing my work serving as a basis for further studies.

But my takeaways are:

\- it's not always fun. It feels fun and rewarding now that everything is finished and I'm seeing my hard work being useful, but at the end I just wanted to finish and meet my deadlines. It works for some people to keep the end goal in mind. For me, it was detrimental: the end goal was huge and to think about it would only overwhelm me. On the other hand, having a plan with small, achievable tasks, helped;

\- keep your mind in shape. Besides having healthy food, sleep and so on, try to create conditions for a good emotional environment;

\- plenty of time was detrimental. I had always dreamed of an opportunity of having 8 or more hours in a row, for many months, thinking that, then, I would do lots of meaningful work. I ended up procrastinating everything else, other important tasks started to pile up and I faced what is the worst feedback loop of my life so far. I came to realize that I was more productive on 4-hours or even less work days;

\- I keep collecting unfinished projects, but, as another commented said here before, it's OK. That might not impress recruiters and the community, but I learned something from them, have some reusable code and knowledge, and I can finish them whenever I feels like.

</comment><comment><USER72> Failing side projects aren't complete failures; just think of them as exercises and learning new things.

Getting it done is just a (great) side effect.

</comment><comment><USER73> I like the suggestion of a context file.

Sending love to everyone building side projects, you're awesome.

</comment><comment><USER74> Relatable post. There are some projects worth finishing.</comment>


Ask HN: How do you interview a software company? - <AUTHOR> Often programmers are interviewed by the company, however what should we do on the developer side to interview the company? Could you share any good questions to ask (Technically, culturally or philosophically)? <comment><USER2> So there is a range...it will depend on the size of the company, and what level of a developer you are. However, a process that you see often is made up of multiple rounds. Starting with introductions on both sides. This is where you will talk about what you are currently doing, what technologies you are proficient at, overview of company culture and technology stack. This could be followed up again with a more technical person compared to a recruiter that is filtering candidates. Next will come the technical challenge to demonstrate you can develop. This will range as well. You can get take come code, peer coding challenges, or online tests. In my opinion, this is the round that you should be focusing on. You do this by studying your language. Let's use JavaScript. You will be asked about prototypes, closures, execution context, lexical environments, es6, and etc.. You need to know these well, and actually be able to use them. The technical aspect is testing your knowledge of the full language and your ability to use it. So if any aspects of the language is unclear to you, learn it. I would also say, practice coding with a time limit if you want to be an overachiever a bit. I haven't, but it would be an honest improvement I could make to my preparation. It would take some stress off at the very least.

Hope this helps...

</comment><comment><USER3> Personally work/life balance is very important to me, so I tend to ask about that. This is trickier for people at the beginning of their career though, but can be done.

From a broader perspective it's not just about the interview process. You need to do research up-front about the company (which also useful to help sell yourself).

1\. Read all their job postings, and their website. Company values are useful.

2\. Read Glassdoor reviews, if there are any.

3\. Talk to anyone you know there.

4\. During interviews, ask the right questions. [https://www.keyvalues.com/culture-queries](https://www.keyvalues.com/culture- queries) has good suggestions.

More here in this blog post - [https://codewithoutrules.com/2016/10/14/job- you-dont-hate/](https://codewithoutrules.com/2016/10/14/job-you-dont-hate/) \- as well as in my book (again, focused on work/life balance) _The Programmer 's Guide to a Sane Workweek_ ([https://codewithoutrules.com/saneworkweek/](https://codewithoutrules.com/saneworkweek/)).</comment>