Waking up at 5am to code - <AUTHOR> http://www.mattgreer.org/post/2fiveam <comment><USER2> A lot of commenters have talked about the pros of this routine, and there are many. Few interruptions, working while your mind is fresh, working within a regimen, etc.

However, if you don't have an equivalent amount of discipline on at night to get enough rest, you will quickly burn yourself out. I did this routine for a lot of the second half of 2011, and since I'm a night owl by nature (going to bed at 12 midnight is 'earlyish' for me), the lack of sleep quickly caught up with me. My project was actually getting some traction though, so I basically spent about four months in a sleep-deprived haze and consuming about 400 mg of caffeine a day just to function.

So I guess what I'm trying to say is, if you're like me and you go to bed at 1AM, wake up at 9AM, and go into work at 10AM (a very common engineer schedule), then it's not just a case of setting of your alarm clock but really adjusting your lifestyle so you're not fundamentally sleep-depriving yourself.

<comment><USER3> The caffeine is a vicious cycle (I've been there.) When you're short on sleep, you need it to get through the day, but the side effect is you end up staying up later than you need to. Also, if you want to get to sleep, avoid screens (TV, computer) for the last hour or two before bedtime and you'll find it's a lot easier (E-ink readers like the Kindle are great for this.) It's hard to switch gears from the stimulation of TV or a game and go to sleep unless you're already overtired.

A lot of this also depends on age, I suspect... I used to be a 1AM-type person in my 20s but as I've grown older, I find I naturally wake up at 7 AM or so anyway. By 11pm or so, I'm geting pretty useless. My sense is this happens to lots of folks as they get into their mid-30s, even if they don't have kids.

<comment><USER4> _Also, if you want to get to sleep, avoid screens (TV, computer) for the last hour or two before bedtime and you'll find it's a lot easier_

Is there evidence for this? I've heard it's true, and it seems to be from my personal experience, but I've never seen any kind of a study of it.

<comment><USER5> I'm not sure about the two hour timespan, but brightness appears to have an effect on sleep latency and the time it takes to fall asleep.

Studies [edit: PDFs]: [1] <http://www.journalsleep.org/Articles/250312.pdf>

[2] [http://www.sciencesleep.org/ziliao/Effects%20of%20playing%20...](http://www.sciencesleep.org/ziliao/Effects%20of%20playing%20a%20computer%20game%20using%20a%20bright%20display%20on%20presleep%20physiological%20variables,%20sleep%20latency,%20slow%20wave%20sleep%20and%20REM%20sleep.pdf)

[3] [http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2869.2005....](http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2869.2005.00463.x/pdf)

<comment><USER6> Definitely install F.lux: <http://stereopsis.com/flux/>

It adjusts the color temperature of your monitor as the sun goes down. As the sun sets, your monitor becomes more red/pink. It takes a little while to get used to it, but I absolutely cannot stand normal monitors at night time now. When I occasionally disable F.lux to watch a movie at night, I'm blinded by the bright blue glow.

<comment><USER7> I've recently done this, and it helps when I'm on-call and get woke up in the night. I can now fall back asleep faster. Another item that helped, I've put oil lanterns up on the walls in my home office. I just got to remember to light them instead of flipping on a light switch, and all is good.

<comment><USER8> That's a nice touch I hadn't thought of. Any ones you like in particular?

<comment><USER7> I picked up a couple of generic ones, I think they are made by Lamplight Farms. They include a bracket that hangs on the wall with a reflector plate. Other than the wall mount, most of the oil lamps are about the same (that is, the ones in the $5 - $20 range). Of course, I picked up these ones about 10 years ago, and I can't find this particular model any more. I can only find the table top ones (could probably put it on a shelf, with a mirror behind it for better effect).

You can use either lamp oil or kerosene in most of them, the lamp oil doesn't stink as bad (and if you get the "ultra pure" oil, there is hardly any smell at all). Also, last time I had a power outage I was able to keep the flame lit (on a pilot light height) through the night with hardly any oil used (and it made a nice night light -- don't know how safe it is though).

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> > Enjoying the work is key

Recently I've discovered that this mindset has been detrimental.

Sometimes hard work is supposed to be hard. If you rely on passion or some sort of intrinsic motivation, then as soon as you come to a task you don't want to do (i.e. the 90% of any project that doesn't involve coding) procrastination sets in. I worked mornings non-stop on my little side project for around 6 months last year and slowed right down as soon as all the 'fun' stuff was over.

Accepting that the work is sometimes going to suck is a) more realistic and b) more empowering. If you get used to short focused bursts of work you don't feel like doing, then there is quite literally nothing you can't achieve if you put your mind to it.

<comment><USER10> Maybe I just read it differently, but for me this article described a way to cram things that I _want_ to do (other people might play the violin every night at 20 for fun?) into the early morning hours.

You're making a good point, _if_ we're talking about doing business in these hours (like trying to progress on your own little startup idea). If you just want to meddle with a small project, experiment with this $randomNewTech or improve your code for the fun of it, then this attitude of 'It should be fun' seems perfectly alright.

<comment><USER9> I think doing work you don't like or that you find difficult is compatible with new tech you want to learn just for the heck of it.

As an example I'm currently trying to deep-dive on Natural Language Processing. I'm a middling programmer but quite useless at Maths, so I know my weak points are going to be the stats used in NLP.

In this, I've picked up the most highly recommended university level NLP text I could find I'm putting in a couple of hours a week studying it. After about thirty minutes in, I begin losing focus and it starts becoming really easy to think of distractions or reasons why I shouldn't be doing it.

It's at times like that when it helps to realize that no, I should be doing this, I don't need to take a break, I should just power through. I'm not necessarily enjoying everything I do in these sessions, and it's definitely hard work in unfamiliar territory.

I've found that concentration is like a muscle, the more you train it, the harder and longer you can maintain it without taking a break. For me, expecting the work to be fun sets me up to give in as soon as I start losing focus.

Interestingly, after going at work 100% for hours at a time, I actually feel way better than I do than after a half-arsed attempt at productivity. Usually I've created or learned something, and I don't have that guilty feeling that I could have got more done today.

</comment></comment></comment><comment><USER11> I've tried this approach and others. I'm sure for some it can work but ultimately I found you can't cheat time. If you wake up at 5am by 2pm you toast (mentally at least). I've found no real secret to gain extra real hours. The reality is that your mind can only function productively for so long each day. The productivity you feel at 5am is the same you'd feel at 8:00am it just seems more amazing because it's happening at 5.

The bottom line is you have to find what is sustainable in the long run. Regardless of how early or late you wake up the key is coming up with a consistant schedule that maximizes your productivity. Only you can figure out what the schedule is. It's certainly great to try new things and see what ends up working for you. Good luck.

<comment><USER12> If you wake up at any time of the day, mid way through it (no matter when) your brain "is toast".

That is why so many sleep scientists suggest naps is because they have proven that naps are beneficial to mental fatigue.

<comment><USER13> Really? My brain is semi-toast _until_ about the middle of the day.

<comment><USER14> Maybe due to over use of caffeine?

<comment><USER15> I'm the same way, and my friends had the same reaction as you. They suggested that if I cut out caffeine and sugar then my body's own natural energy would resurface, and I'd stop being so groggy until the mid-afternoon.

So, I listened to them, and for 9 months I consumed no stimulants at all. After 9 months of this experiment, I was -- and I know the story isn't supposed to work this way, but it did -- consistently groggier and crankier than I had ever been before. So I went back to caffeine and have had no second thoughts about it since.

<comment><USER16> I say with __conviction __(having the same experience) that this is because your endocrine hormonal system is __seriously __out of whack. Probably hypothyroidism, but possibly hypopituitiarism or even lack of testosterone.

Go see an endocrinologist, stat! Your quality of life, and even longevity, could be at serious peril.

<comment><USER15> Hm. You may have a point. This was back when I lived in America, and seeing an endocrinologist would have required winning the lottery or something. Now that I'm living in a more civilised country, perhaps I'll give it a try...

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> Love this - a simple personal anecdote/retrospective rather than a self- promotion or "everyone should do as I say" piece.

You could solve the girlfriend + music issue with a nice set of closed-stage headphones. I love my AKGs. But I'd actually A/B test with and without headphones - without the distraction of office noise, no headphones/music might actually be helping you focus as well. I find that even with a solid, no-thought, tried and true playlist of entirely ambient (or even classical) music, I still find music causing my mind to wander from time to time.

I might have to try to sell the girlfriend on this idea soon.

<comment><USER18> Yes, in the morning it's so quiet that I find music distracting.

The one thing I've added is a nice room air filter and run it on low. The quiet white noise from the fan provides a smooth background.

</comment></comment><comment><USER19> In the last six or seven years I've been up regularly at 5am or so. I can get an hour of work done before the rest of the household wakes up. It's great.

My inspiration was Gene Wolfe, who wrote _The Book of the New Sun_ in the wee hours, and held down a day job as a technical magazine editor. [I'm not claiming my code is anywhere near as great as the wonderful writing that Wolfe did, but the early hours are definitely some of my most creative time]

A few rules I have:

\- No email. This just starts the whole stress machine going. I'd rather not have /any/ human contact, and if something's fallen off and broken in the last eight hours, it can wait another two or three.

\- No Reddit or other black-hole-of-surfing sites (though I do check HN -- this may change if HN becomes too Reddit-like).

\- Coffee is ready to go (set up the prior evening).

<comment><USER20> > _My inspiration was Gene Wolfe, who wrote _The Book of the New Sun_ in the > wee hours, and held down a day job as a technical magazine editor._

Wow. That's really interesting. I was actually going to give this a try because of Robert Pirsig, who wrote _Zen and the Art of Motorcycle Maintenance_. Here's how he did it:

 _In a 1974 interview with National Public Radio, Pirsig stated that the book took him four years to write. During two of these years, Pirsig continued working at his job of writing computer manuals. This caused him to fall into an unorthodox schedule, waking up very early and writing Zen from 2 a.m. until 6 a.m., then eating and going to his day job._ [1]

Funny he also writes technical literature (computer manuals versus technical magazine editor).

> _the early hours are definitely some of my most creative time_

This is something I've noticed too. When writing (usually essays, but sometimes code), I'm almost always more productive very late night/early morning. I don't know of any reasons (other than the obvious: you're not being distracted), nor do I know of any studies. Are there any out there?

1\. [http://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_M...](http://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_Maintenance)

<comment><USER21> When writing my thesis I was very productive at night. Guess I was too tired to procrastinate and over-think things.

<comment><USER22> I am missing the right words but one gets more creative in the evening. Many people can relate. A friend of mine worked from 1800 - 0300 for his master thesis, because the words "flowed" better.

</comment></comment></comment></comment><comment><USER23> When starting my business, I was working as a derivatives trader. The job was stimulating but I did not love it. It was not creative enough. Creative in the purest sense of the world. We did not create businesses, rather create profits through buying and selling.

I had to be up before 6am anyway to get in before the markets opened. We could leave shortly after the markets closed though so I did most of my work time in the evenings from 6pm to 10pm, sometimes later. And then on the weekends (probably another 12 to 20 hours).

I think the important points are:

1\. Enjoy the work. If you do then you don't feel like it is work, rather a hobby.

2\. Make the most of your 'day job' time. I would squeeze in gym whenever things were quiet. I would answer emails on the toilet. I would read the Financial Times and then sneak in Tech Crunch (I was trading TMT so I argued it was important to view trends).

3\. Stay disciplined. A lot of the time I would get excited and stay up later. Rolling out of bed at 5:30am to get into work after being up since 1am does not feel great. You can do it once during a week, but twice and you really do become a zombie for the rest of the week until you get the time back.

I did this for two years until I managed to get some funding to take it full time. It was super tough, especially for my girlfriend. But I loved it because I believed we were building a project that would change the world. Whenever I felt down I just watched SJ's Standford speech and it would pick me up.

"Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle."

</comment><comment><USER24> My wife is a surgeon. I'm up at 5am with her, drive her to work, then sit down and start working myself around 5:30. I find that I'm fantastically productive from then until about 9 or 10am. I take a long lunch break (and go running or xc-skiing depending on how much snow is on the ground); aside from that I don't have any trouble going straight through the afternoon, though my afternoons are less productive (I usually spend them meeting with team members and doing more routine work because of that, which works well because that's when everyone else is around).

In order to make getting up at 5 livable, we're asleep by 10pm. We were both night people once upon a time, but I really don't feel like I miss it.

<comment><USER25> OT: Why do surgeons start work at 5 am?

<comment><USER26> Table time for the first case of the day is usually quite early, as you want lots of time in case there are complications.

<comment><USER25> That doesn't seem to change the available time. You can start at any time of the day, there still the same amount of available time (ie 6-1800 hours is the same as 8-2000 hours)

</comment></comment></comment></comment><comment><USER27> This is a really effective way to get a lot things done. In summer 2009 I used to wake up before sunrise and absolutely loved it. To this day, I still wonder why I did not continue doing it.

My 2 cents:

Make sure you have something good (preferably healthy) to eat readily available when you get up. It should be something that does not require more than 10 min of preparation. Otherwise things tend to get a bit boring.

If you happen to wake before sunrise. Take mini walk in you garden or backyard and catch those 10 - 15 minutes of sunrise. It will absolutely super charge you for rest of the day.

EDIT: Let's admit that we all have a small nest at home specifically for work or related activities. Move this nest out of your bedroom. Keep your laptops, iPads, PCs or any such devices out of your bedroom. Switch off your phones during nights and do not switch them back on until after your morning sessions.

(PS. My uncle is a neurologist and he tells me that for people who work during day and rest during nights, certain hormones are secreted in the mornings that help us in staying fresh and awake. The catch is that they are only secreted if you wake before or around sun rise time.)

<comment><USER8> That's interesting. When I was in college I used to wake up at 5am every morning. I'd always start my day by taking the trash outside and looking at the sun come up over the ocean. (I went to school in Santa Cruz). Those short moments always set the tone for the rest of my day.

<comment><USER28> > I'd always start my day by taking the trash outside and looking at the sun > come up over the ocean. (I went to school in Santa Cruz).

I suppose I understand what you're trying to say, but the idea of watching a Pacific Coast sunrise from Califonia (while not in an airplane or other fast- moving vehicle) breaks my mind a little. But your comment also made me realize I'd lived within a half hour drive of the Pacific Ocean for most of my life yet have no clear idea what a beach sunrise would be like. I need to add that to a list.

<comment><USER29> bit late but ... you can also see this from the santa barbara harbor. I used to surf there in the early morning and the sun would be rising _behind_ the waves. Not a lot of places on the west coast that that happens!

</comment></comment></comment></comment><comment><USER30> I am a stay at home dad recovering from AML stim cell transplant. I have been trying to find time in my day to work on a personal project that I need to develop for myself and I think has a potential for profit. However with my busy 1 year old son waking up at 8AM(sleeps all night, which I am super thankful for), I can't find the time during the day to focus on a project. I get spurts during his 30-40 minute naps and when he is playing real good by himself, but as I get focused I am quickly pulled away. I have tried to be productive when I put him down at night, but I find I need to spend this time with my wife.

It is looking like I might become a 6AM coder soon. Seeing that my day starts at 8AM.

I had thought about getting up this early, but I just didn't think I could make it through the day with my semi-low energy levels.

However, I am thinking if I get up at 6AM, I can nap when my son naps for 30-40. As I read another post on HN that it actually is great to take these short duration naps.

<comment><USER18> People generally have two high-quality stints in them per day. Putting in a sleep cycle (be that a power nap or up to a full cycle) between them works wonders for all sorts of benefits physiologically and creatively.

</comment></comment><comment><USER31> I would love to see a simple service that groups people who are willing to commit to getting up at the same time each day in order to hold each other accountable. There doesn't need to be anything significant - maybe it's just a matching service, letting people figure out for themselves how they can "check in" to confirm they are up and working at 6am (or whatever time is chosen). I know that I definitely can commit to something like this (e.g. going to the gym early) if I have at least 1 other person I'm doing it with.

<comment><USER32> This is a great idea. Probably doesn't require any groundbreaking technology either. Dear internet, please make this.

EDIT: An iphone app that let's people call and text each other as their profile name (anonymously) would probably lower the barrier to sign up for something like this.

<comment><USER33> Maybe even a combination of this with the idea of pledging money if you don't achieve something? How much more motivated would you be to roll out of bed at 6am if you knew that skipping it would cost your buddy cash?

</comment></comment></comment><comment><USER34> Could someone please expound upon the term "Kanban board", as used in this article? I am not understanding the connection between Kanban and what the author is describing, though I would like to.

<comment><USER35> It's some kind of sticky-note board / to do list thingy.

Have a look over at JoelOnSoftware (?? Or was it the Fog Creek Site?)

They have a free online version of something similar that they are trying to hit the big time with. I forget what it is called though.

<comment><USER36> You are talking about Trello from Fog Creek.

</comment></comment></comment><comment><USER37> Mornings are great. Yesterday I woke up at 4 and saw that Facebook Hacker Cup is on. I finished all the problems before my work day started - how awesome is that to start your day?

One thing I don't understand is how people can focus on a couple of projects simultaneously. This year I've worked a lot with javascript and backbone, and I have a folder with ~4 open source projects I wrote that I'm not going to publish. Why? Because then I'll shift my focus from delivering the product to delivering open source.

It takes me a few hours every Sunday and Friday to get in the mood of 'this project is going to kick ass'.

<comment><USER38> This might be controversial, but have you considered opening an anonymous/throwaway github account and publishing there? I mean put them up, make an announcement, and then feel free to ignore any social pressure to work on them, at least that way the code is out there where somebody else _could_ pick it up and improve it.

Just seems like a weird reason to not release code you intended to be open source.

<comment><USER37> Actually never thought about. I recently wrote Verdict and published it as a gist. It was horrible! People asked me for help! And I created a full repo and a website instead of working. <http://radagaisus.github.com/verdict/>

</comment></comment></comment><comment><USER39> This sounds horrible... and like it would ruin my productivity towards the end of my work day.

How about waking up early to exercise?

<comment><USER40> I tried waking up early to exercise, but I can't motivate myself to get out of bed to exercise.

I could motivate myself to get up if I were working on my own projects. I'll have to try this.

<comment> brown9-2 It might help to think of fitness as a self-improvement personal project. Track your accomplishments like stats in a video game, see fitocracy.com for example.

</comment></comment></comment><comment><USER12> I have been doing the exact opposite of this strategy for some time now. Going to bed at 5am. Those 6 hours of coding between 11pm and 5am are some of the quietest you will ever experience in Toronto where I live at least.

If I woke up at 5am, I would b _HORN_ e cons _HORN_ ta _HORN_ ntly distrube _HORNNNNNNNN_ d.

<comment><USER41> The noise pollution in Toronto is obscene and I am thinking I should move somewhere else. I live by the Gardiner, and I also code at night, it is bliss, there are virtually no cars on the road. No noisy neighbours or horns or traffic or street cars.

<comment><USER12> Wow, was just thinking I should move to SV the other day due to lack of a hacker community and look at this, two relevant Torontonian comments!

Agreed, noise pollution is horrific. I don't have a problem at all with new york's latest "fine for honking" tariff: [http://www.huffingtonpost.com/2011/10/25/nyc-taxi-drivers- to...](http://www.huffingtonpost.com/2011/10/25/nyc-taxi-drivers-told-to- _n_1030767.html)

</comment></comment></comment><comment><USER42> Matt,

Thanks for sharing. I did the same for several months, I would call each session a mini iteration. And I kept a kanban board on my moleskine...which is imperative. I had times where other things would take precedence and I would stay away from my project for several days but due to my physical kanban I could easily pick up where i left off.

What I did different is this: at each iteration i would set a goal that I new I could accomplish within the mini-iteration (1-2 hours, sometimes a little more). Then at the end I would check off my accomplishments and would quickly "trim my backlog" and create a list of "NEXT:" for the next time. Then the next time I sat down I would review this list and adjust it as necessary and begin.

I found that have a physical notebook was beneficial because at the first sign of discouragement I could easily look back and see where I was just a few weeks ago or a few months ago. And nothing feels better than marking something complete. My lists are segmented by each iteration by day and have three categories: DONE, TODO, NEXT. it worked great for me.

Though I never delivered my product it was a great talking tool at an interview that led me to a job with a 30% pay increase. And I'm ok with this.

</comment><comment><USER43> There's probably little to add here, but since I've been doing a 5am coding period each morning for the last year.

First, I am 42, married with 1 kid, so that may explain some of it. ;)

Some keys: 1) Coffee maker on autobrew, but not immediately upon waking. Give yourself and your stomach time to wake up.

2) Eat and/or drink something easy upon waking. I go for the MixOne protein shakes, or OJ.

3) A clear goal of what to accomplish that morning.

4) Get enough sleep or you will burn out and have to stop for a time period of recovery. I go to sleep or rather, my body & mind collapse, at 9PM. Asleep by 9:30. I am able to get 7-8 hours of sleep every night. More than plenty.

5) Don't use anything with a screen (except maybe an e-ink Kindle) before bed. Reading helps me to get right to sleep.

Due to having a kid in preschool, I generally am limited to 1-1.5 hours in the morning. Which is just enough time to do one task and very little else, hence the need to focus on something.

</comment><comment><USER44> I wish it were possible for me to do something like this during the week, but it isn't. I wake up at 05:30 as it is, and I'm out the door and heading to work by 06:30 (that's an hour to SSS, prepare and consume breakfast, take out the trash, scrape the windshield, and whatever else might need doing). I don't get home until after 17:30. I'm typically occupied being a loving and attentive father up until 20:00 or so. Assuming I want to get 8 hours of sleep, that means I'm left with one and a half hours to split between personal projects and my wife during the week.

On the other hand, I do get up just as early on the weekends, and it's probably my most productive time of the entire week, up until my kids get up.

<comment><USER45> A question. Your job takes 11 hours out of your day roughly. I assume you only work 7.5 or 8 hours like is standard. Does that mean you have a 1,5 hours each way commute (3 hours total)?

So you spend 15 hours a week, or 70 hours a month commuting?

Maybe you should move closer to work? Or work from home a few days a week if your job allows. I have a 5 minutes each way commute. I don't understand the voluntary 1.5 hour commute.

<comment><USER44> I actually live only 10km away from where I work, and my commute amounts to less than an hour per day.

I'm at the office by 0700 and I leave sometime after 1700. My work situation deviates significantly from a programmer's "standard" in a lot of respects, unfortunately. I do get paid for overtime at least, but I'm beginning to question whether it's worth it.

</comment></comment></comment><comment><USER46> I did something a bit more extreme for over a year - and I have a family to contend with. But I wasn't coding, mainly product dev a(wireframes, specs, etc) and some hacking.

Schedule was:

\- Hang w/family from the time I got home until their bedtime, roughly 9:30 PM.

\- 2 hours of work, then 30-45 min of useless TV (Family Guy or TAR)

\- About 5 hours of sleep

\- Another 2 hours of work before hopping on the train

Somehow I kept this up for over a year, though it has to be said that I curtailed the workload to just 2 hours a day (and a bit more sleep) over the weekend to spend more time w/the family.

I think that's the only real guidance here - as long as you can budget adequate time to recharge the batteries, then you can keep this up for the long haul. For me, hanging with the family kept me fresh, kept me sane.

</comment><comment><USER47> This totally works. Why?

You put your best and most creative energy into your own project.

Instead of whatever you have left in the tank after a long day of work and then doing home stuff and then finally settling in.

Getting out of bed isn't a problem when I'm so excited to work on something and I know what exactly I need to do -- I make a list before I go to bed.

Lack of distraction plus a full head of steam and energy is a great combination.

I try to do this as much as possible because it's so rewarding. Breaking the cycle with a late night or the weekend seems to be my main obstacle, I'm thinking of waking early 7 days a week and becoming like my old man, lol.

Will work/job suffer? Our work/job often needs our attention to detail more than our best and most creative effort every day.

</comment><comment> k-mcgrady Interesting post. I used to do this myself but eventually found it difficult to get up so early. I've recently been trying out something similar though.

I find it difficult to get to sleep often lying awake for up to 5 hours before falling asleep. As I am a freelancer I then tend to make up for it by sleeping in late (as I don't have a job to go to).

I have recently been following a schedule of sleeping 2 nights and then staying up 1 night. This night without sleep I use for work and it also helps fix my problem of getting to sleep for the next 2 nights. I find that I am extremely productive working through the night and gain in productivity by falling asleep more quickly and getting up earlier the other 2 days.

<comment><USER48> I've been in this cycle before. I still almost fall into it naturally, but less so than when I was in my early twenties.

My experience was that it isn't sustainable, the day after you stay up all night just gets worse and worse the longer you are on that schedule. After a short time, for me, that day was so unproductive that it more than destroyed any gains made in those extra hours or the encouraging "reset" to my ability to sleep at regular hours.

I have to admit that the early night and long sleep after that day was the best sleep I could get at the time.

The rest of it was pretty shitty, I slept like a dead person and woke groggy. Good sleep habits and a regular schedule have a domino effect, improving all sorts of stuff, definitely worth trying to stay off that sleep 2, stay up for 1 cycle in my experience.

<comment> k-mcgrady It's been working for me so far but I can see how it would be hard to maintain. I don't expect to keep it up forever. Although it's working now I doubt it will last more than a month. Good to hear someone else experiences this sort of cycle naturally. Sleep is a big problem for me and really hurts my productivity so I'm always trying to figure out new patterns that might help, at least short term.

</comment></comment></comment><comment><USER49> It wounds like the poster has managed two disciplines very well:

\- Managing the sleep schedule. (Getting to bed to get up early)

\- Managing the work schedule. (Kanban system)

I have no idea what his product is, but it's hard to imagine that he won't be successful over the long term with habits like this.

</comment><comment><USER50> Thanks for this post, I will need to try it.

I agree the few times I've been up early to code (even to catch up on some work) its been good, felt like I got extra hours to the day (well, I guess I did!) even before I officially started.

I think then after 5pm going to the gym or relaxing can be a good choice because I've already done my 2 hours on my side project.

It does get exhausting doing extra work after 5pm (after you've taken a break, eaten, done other things etc) so I like the idea of doing it early.

I may wake up even earlier to get to gym in the morning, as I liked that too.

I definitely waste several hours at night just messing around, avoiding going to sleep, which would be better spent being asleep so I can get up early.

<comment><USER51> This tool might help you to figure out the best time to sleep so you can wake up rested. <http://sleepyti.me/>

</comment></comment><comment><USER52> Another option that you should look into is switching to a four day, ten hour each day schedule. Of course your employer has to approve and I've seen a lot of people that can't keep up with the long days, but if 5am schedule works for in the long term you shouldn't have any issues with it.

I've done this for the last four years and it really works well for me. It gives me the option to work on my personnel projects on my off day (Friday for me). It also forces you to wake up early and the morning always seems productive. The best part is you can be flexible with that time, like on some weeks maybe you take a long trip or family/friend time.

</comment><comment><USER53> Why is waking up two hours earlier in order to do stuff like coding on personal projects so much better than staying up for two more hours at night?

It won't make the day longer. Each hour you wake up earlier you will also probably go to sleep earlier. Of course you could also sleep less, but also in that case IMHO it doesn't make a large difference whether you add those extra hours to your night or to your morning.

Some might argue, that morning hours are more productive. But for me that is only true if I have slept well and long enough and it also implies that whatever you do in the evening will suffer by starting your day earlier.

<comment><USER54> I would guess the if you code in the night your 2h turn into 6h. While if you do 2h in the morning you have to stop and go to work.

<comment> brown9-2 I think this is the fundamental reason also. It's much easier to slip and add more hours to the end of the day than it is to wake up even earlier than 5am.

</comment></comment></comment><comment><USER55> I'm coding at 6am now, because I've been up all night! I don't enjoy it, but I find it very difficult to want to go to bed at the right time. Working in a startup time doesn't seem to matter so much I guess.

</comment><comment><USER56> Quite the coincidence - I just started doing exactly this a few weeks ago, and am fact am reading this at 5:30am my time (when I should be coding :P). It has worked quite well for me as I work on my app.

I'm a bit more tired in the evenings and go to bed a bit earlier than I used to, but seeing as how I would just waste time in the evenings playing Jetpack Joyride, it's a very good trade to make.

I bought a coffee machine that has coffee waiting for me at 5am, and I also use the Sleep Cycle app which at the very least provides a placebo for making me wake up more alert. ;)

<comment><USER24> Exactly. Most people are far more distractible in the evening (partially because there are simply more distractions available), so shifting your schedule earlier results in less time spent on distractions.

</comment></comment><comment><USER57> I've thought about doing something like this but I've realized I just can't until I figure out a better commuting situation, either having a very short commute or using public transportation. Sitting in traffic for almost an hour on the way to work is rather draining to where if I'm going to do that I can't seem to bring myself to get up any earlier than I have to as I'd rather use the time spent driving to wake up so its not completely wasted

<comment><USER58> If you can use public transportation, you should _definitely_ try it. I'm a student, but I also work part time in San Francisco; there is about a 30 minute commute. I am actually surprisingly productive while on the train working on my random side-projects. Having something to do stops the commute being a boring waste of time.

The one problem is crowding--if there are too many people, you might not get a seat or otherwise be uncomfortable. I avoid this problem by travelling at off- peak times, but this may not be an option. You should try it out and see how it goes.

<comment><USER57> Awesome, yeah, actually I'm planning to move to the SF Bay Area soon, I'm from northern California originally and want to get back there, I think living further out and using BART to get into SF would be fine as it would give me some time to work on things, or even just to use my tablet and read up on things, do research, etc. Just being able to relax and not have to watch the road for the hour commute would be a lot better IMO.

</comment></comment></comment><comment><USER59> I used to do this a while ago, while working from home. I woke up at 6am and had my breakfast right next to the computer, then would only do the 'morning routine' (shower, walking the dog, etc.) after my wife had woken up and gone to work.

It was incredibly productive. As the author say _the cost_ of those two hours keep you focused (you know you are making that extra effort, so distraction isn't an option.)

</comment><comment><USER60> Mary Kay in her book called this the 5 am club! She said the 2-3 hours she got before the rest of her family were up was so productive that it was "almost as if she had 24 hours a day extra to work with" Paraphrasing here but she said he enabled her to manage her traditional roles of being a husband & mother in addition to a full time & demanding business role.

</comment><comment><USER61> I have been on this routine for about 18 months. Waking up early in the morning is not easy or fun, but the alternative is to work in the evening or not at all. I find working in the evening really difficult because after a full day of work and a nice dinner with my wife - I am not really in the mood to "go back to work". Waking up early allows me to put my personal project into a set routine. 2 hours every day - not 2.5 or 3 or an all-nighter. This constraint is great for focusing the mind and making those 2 hours really productive.

There is one downside. I really need to be asleep by 9:30 (I actually wake up at 4:30). This is difficult to do when I meet up with friends. For example, this week I have two meetups planned - both of which will probably cause me to get home past 10:30 which means I am more likely lie in the next morning. ...and I agree with the OP - it is much easier to keep a schedule like this if you do it every day.

</comment><comment><USER62> This isbexactly how i lauched two products with a family with 2 kids 5 am kicks ass. That remibds me... i need to go to bed.:)

</comment><comment><USER63> I did this for several months while I was taking the Stanford AI class. I got up at 6, did coursework for two hours or so, and went to work by 9.

I found it to be highly beneficial for several reasons (some of which were mentioned in the blog post): -since I am usually exhausted by the end of the day, I found the early time to be really conducive to clear thinking -early part of the day is so quiet-- no interruptions -I felt like I accomplished quite a bit even before arriving at work, so I somehow felt more productive even though I should have been more tired

I intentionally did not keep up the early time on the weekends and slept in-- btw, 8am felt like sleeping in :)

Since the class finished, I kept up the habit and wake up early to code or read.

I admit it isn't for everyone, but it is worth a try for anyone who wants to code after work but feels too tired or easily distracted.

</comment><comment><USER64> I did something similar for a while but other concerns pushed my routine out of the window, and for the sake of my sanity I shouldn't have kept on with it as long as I did. If I could recommend one thing to anyone thinking of doing an early-morning stint, it would be to keep an escape route clear. Don't commit to more than a week's work at once (you shouldn't be doing this anyway) and make sure that you can unconditionally drop the project at short notice if something comes up. Otherwise you will find that your work strategy is very fragile and very explosive.

That said, the particular issues I faced were external to my early-morning work strategy, and on a level playing field it is a wonderful way to do some of your best work.

</comment><comment><USER65> For those of you, who as me, never encountered the "Kanban" method before here is a comparison with SCRUM

[http://www.agilejournal.com/articles/17-articles/1737-what-i...](http://www.agilejournal.com/articles/17-articles/1737-what- is-best-scrum-or-kanban)

</comment><comment><USER66> He mentions he gets between 7-8 hours of sleep. So he is going to bed around 9pm to 10pm... Yeah, not really feasible for a lot of people because it would mean family avoidance.

I usually work from 11pm to 1am on personal projects.

</comment><comment><USER67> Another advantage: the first two hours of exerting your programming mojo each day are likely to be the most potent. Applying this potency to your own products and initiatives is a beautiful thing.

<comment><USER68> It's not universal though. I find (sometimes) late morning and (usually) late afternoon are my most productive or potent times. I suspect everyone is different. It seems that this idea though has the added benefit of bringing more focus (due to less of the normal distractions.) For me, I think, that would be the major difference .

</comment></comment><comment><USER69> We're currently doing our football pre season training and for the first time this year there it involves a Thursday morning session from 6.00-7.00am (we normally train 8.00-9.15p.m.).

This hasn't been as unpleasant as I thought it would be and I've noticed that the morning session 'feels' like it is evening time. Several of my team mates have made the same comment.

I'm guessing this is due to an association in the brain (several years reinforcement) between the activity (football training) and the time of day.

</comment><comment><USER70> My problem doing this is the weekend. I like to go out to concerts and occasionally bars with friends, which has me out until 1 AM on an early night. Then I sleep in the following day, which destroys the whole schedule, since it's the complete opposite of what I need to do during the week.

Compare my current schedule, which has me going to bed around 2AM most nights—even if I go to bed at 5 AM on Friday, that's only 3 hours off from my usual schedule, so it's much easier to recover by Monday.

</comment><comment><USER71> I'm almost in the same boat with the guy that wrote the article. Like him I also read 1year ago, on hn, about a guy who started to code on his projects starting with 5 a.m. because in the evenings he spent time with his fiance.

After I read it I tried it for a while, and it worked, I had to stop because then I was also a student and I was also working full time + I also had allocated gf time.

I will try it again, I hope I can get more things done in this way.

P.S. Thank you for/for posting the article!

</comment><comment><USER72> 5am sounds a little extreme.

I just arrive at work a half hour before I "should" be there. That's when I do a little code kata or read HN. Then I grab a coffee and it's work time. After work I go to the gym and coming home from that I find I have enough energy to put in another hour or two on my side projects.

However, having kids might change that and make 5am more sensible... you might at least get an hour before they're up and you have to get them ready for school.

</comment><comment><USER73> I wake up at 4.30 AM but code between 7 AM and 11 AM. So what do i do between 4.30 AM and 7 AM. I meditate, do a goal review and do my blog / book writing work.

I wrote about this on my blog "Daily Routine of a 4 Hour Programmer" [http://www.jayonsoftware.com/home/2012/1/9/daily-routine- of-...](http://www.jayonsoftware.com/home/2012/1/9/daily-routine-of-a-4-hour- programmer.html) if any one is interested.

</comment><comment><USER74> was a post a day or two ago about creativity being highest in the early AM as well. I do this in spurts but can't maintain it for long stretches...

<comment><USER18> It depends on the person but it's true for me. I tend to do my really hard/deep thinking in the morning and queue up stuff that I can do the rest of the day. The creativity that tends to appear more often later in the day and in the evenings end up being the cool stuff that bubbles up.

</comment></comment><comment><USER75> I find that with the insane amount of meetings and interruptions I might face in any given day that don't contribute to "coding time," this works really well to ensure that I'm getting things done and to keep my mind fresh. I can then engage on the business side of things later without having that nagging feeling in the back of my head that something needs to get done.

</comment><comment><USER76> Interesting that this is posted today as I woke up 45m ago and decided to code on a side project. It's not voluntary but because I've got some time difference issues.

Everything about the benefits is true, and since I'm not forcing myself to do it, I have almost none of the side-effects. The biggest problem with it is that it's incompatible dancing in clubs.

</comment><comment><USER77> I code at 5am too... when I've been kicking ass and rocking in the zone all night! Going to bed at 9pm every day? No thanks!

</comment><comment><USER78> One thing that he fails to mention is that this only works if you live with a partner, as he does, since you're guaranteed some company throughout the day.

Otherwise it's going to be pretty damn lonely, since you'll be in bed by 10 pm when most socializing starts.

You can't go to the movies, go to a bar, go dancing, go on a date, or even watch a grown ups movie on tv.

</comment><comment><USER79> This idea has also stuck in my head since sometime ago (I think it was a comment by @jrockway who said that he got up really early because at that time there is nothing else to do but work), though I do not do it everyday, only occasionally when I want to finish something... I will follow the site for updates! :)

</comment><comment><USER80> This seems highly related to a recent poll - how many hours of sleep do you need a night?

For example, if I tried this, I would have to go to bed at around 7:30pm at night. For a number of reasons (including eating dinner at 6pm), this is completely infeasible. A shame too, since a few hours of uninterrupted time would be great.

</comment><comment><USER81> Sounds like a great habit. There are some studies that indicate problem solving ability is highest when you're "groggy" so maybe skip the coffee. Many authors have developed the same habit during their early days when they had a day job. Mark Cuban said, "You're only at your best once a day."

</comment><comment><USER82> I wake up at 4:30 to read for a bit and some days squeeze in 30-40min of development work. After getting ready I head out for walking between 6:30-9am (depending on the day) then head to work. This gives me room to do a little project work in the evenings.

Glad to see more early risers!

</comment><comment><USER83> With 7+ months of experience being an Early Bird I will definitely recommend it.

For me 1-2 hours of a fresh-brained morning work is much more productive than working whole night. I usually sleep between 11:30 and 06:30.

In general it depends on personality, some enjoy working at night and vice- versa.

</comment><comment><USER84> This is a great idea. I, too, often end up coding if I'm not tired when my wife is going to bed, but it often ends up being a marathon until 1:30 or 2 in the morning. Restraining myself to 2 hours a day, but doing it _every_ day, seems like a good discipline.

</comment><comment><USER85> I am doing this right now. The point, I believe is, that you spend the most productive part of the day working for yourself rather than for your employer. Still, I believe in certain jurisdictions your employer owns your work even if done in your free time.

<comment><USER86> I think it has more to do with the document you signed when you started than where you live.

<comment><USER87> Not really. Some states ban or almost completely prohibit non-competes -- California being a notable example:

[http://en.wikipedia.org/wiki/Non- compete_clause#Exceptions_-...](http://en.wikipedia.org/wiki/Non- compete_clause#Exceptions_-_valid_non-compete_agreements_in_California)

</comment></comment></comment><comment><USER88> This is essentially what I have been doing for the last 6 months and it works great for me. But it only works great because 1) I go to bed at 9 pm - I am literally falling asleep with 5 minutes. 2) Coffee is only allowed before 9am.

</comment><comment><USER89> I do the wake up at 5am routine, but I use it to go to the gym. I think a healthy body helps you maintain a healthy mind. (keep in mind this "healthy body" is very much a work in progress, like many of my coding side projects)

</comment><comment><USER90> It remembers me of Jolie O'Dell's post about her "secrets to productivity"[1]

[1] [http://blog.jolieodell.com/2011/11/03/my-secrets-to- producti...](http://blog.jolieodell.com/2011/11/03/my-secrets-to- productivity/)

</comment><comment><USER91> I woke up at 4:55am for a year while working on Stormpulse. Specifically, 2007, when my first child as 3. I was so excited that I never had a problem launching out of bed and walking down the hall to work by 5:00.

</comment><comment><USER92> I am going to start doing this. Right now after 8 hrs of work, dinner and working out I am dead. I push myself for a couple of hours to work on personal projects but I am far from 100% by this time of the day.

</comment><comment><USER93> I've been doing this for a long time, it's the only way I can stay sane. I get several hours to myself with no interruptions and I can work on personal projects and be totally unaccountable to anyone.

</comment><comment><USER94> You should buy some nice headphones, if you only have speakers right now.

<comment><USER58> Even really cheap in-ear ones are actually very good. You can listen to music _quietly_ and still make it out.

<comment><USER68> For me, music is so important that I would have to disagree and recommend not going the cheap route. Investing a pair of good quality headphones is a no- brainer. Just make sure they are comfortable.

<comment><USER95> And you have to combine it with a good sound card if you want to get the most of your quality headphones; i have this one [http://www.amazon.com/Creative- Blaster-Titanium-Internal-SB1...](http://www.amazon.com/Creative-Blaster- Titanium-Internal-SB1270/dp/B0041OUA38/) and is pretty good.

</comment></comment></comment></comment><comment><USER96> I need a habit like this, maybe I can be more productive on morning than nights (who knows), also some days can go to do exercise, yeah, everything sounds great but the getting up is so painful.

</comment><comment><USER97> I love this routine, but it's easy for it to fall apart for a week if you do a lot of OT at work. I found it really hard to get back into the groove after having to skip a 5am day due to OT.

</comment><comment><USER98> This sounds great but my question is are you a morning person normally? I'm definitely not, so perhaps I'm doomed to not be able to do this?

</comment><comment><USER99> I have been slacking for quite some time; want to do it but have been postponing it.

I guess its high time to just make a start. Thank you for the blog.

</comment><comment><USER100> Are you in california? If so, you should keep in mind that 5 AM is like 8 AM in NYC (i.e. lots of people awake)

</comment><comment><USER101> At one point in my life I decided to start my day at 2:00 AM. It was an awesome schedule for getting shit done.

</comment><comment><USER102> Genuine interest about the doing this every day, also in the weekend: What if you got drunk last night?

</comment><comment><USER103> What online kanban system do you use?

<comment><USER56> I'd recommend Trello.

<comment><USER103> Thank you

</comment></comment></comment><comment><USER104> I guess the biggest problem is that you're pretty tired at the end of the day at your normal work.

</comment><comment><USER105> your girlfriend slashed because you want to work all night for the project, you didnt she? :) anyway, it is a great idea, i am thinking about doing the same too ; )

</comment><comment><USER106> Funny enough, that's exactly what I did this morning.

</comment><comment><USER107> I did something like this writing my first book Zero to Superhero: <http://zerotosuperhero.com>

I'd wake up a 3 am every morning (except Sunday) and write until about 6 am, which is when I got ready for my 7 am shift.

I agree with the author that being super-motivated was key and I had already invested several years research and writing the book. I was becoming worried the book would never get done.

I was also able to avoid cognitive burnout because my day job was at a metal foundry and consisted of mostly repetitive work.

One drawback was I was completely zonked by late afternoon, and had no social life, but I still tried to eek out something for the book before bed (which was sometime between 8-9 pm if I remember correctly).

Afterthought: I can't wake up so early now. Lack of sleep gives me a short temper. Something to consider.</comment>


A FAT32 fragmenter - <AUTHOR> https://gist.github.com/ryancdotorg/9f557d3513710ce91aed <comment><USER2> I did something like this when I was a kid, in QuickBasic. Not as sophisticated - it would just randomly create, append to, and delete files.

I tested it on floppy disks - if you let it run for a while, the remaining free space was so fragmented it was almost unusable. You could hear the poor floppy drive seeking like crazy just to open a tiny text file.

The fun part was defragmenting it afterwards - I miss the days of the graphical defrag that Norton and MS had.

<comment><USER3> That was such a pure pleasure. I can't exactly picture it but I remember it was sort of like watching your dwarf fortress.

<comment><USER4> My favorite ones would show you a grid representing all the clusters on the disk. You would see an open block for free space and a solid block for allocated space.

Then it would highlight a span of blocks to indicate reading.

Finally it would write those clusters elsewhere, indicating so with a different color.

 _Edit:_ Uhh.. and HN deleted my diagrams. See [http://pastebin.com/raw.php?i=nKHddiKe](http://pastebin.com/raw.php?i=nKHddiKe)

<comment><USER5> For your enjoyment: [https://www.youtube.com/watch?v=kPv1gQ5Rs8A](https://www.youtube.com/watch?v=kPv1gQ5Rs8A)

<comment><USER4> Neat. I had one for DOS too that would go left-to-right instead of top-to- bottom, but I don't remember if it was a Norton tool or something else. It was mesmerizing to me as a kid to watch data moving around on the hard drive and the computer magically getting faster.

</comment></comment></comment></comment></comment><comment><USER6> I've usually done intentional fragmentation by filling disk with small files and deleting those while growing a new file to claim those blocks. Works basically with every file system. Some examples where I've used such method.

People often claim that fragmentation doesn't affect SSD drives, but that's not true: [http://www.sami-lehtinen.net/blog/ssd-file-fragmentation- myt...](http://www.sami-lehtinen.net/blog/ssd-file-fragmentation-myth- debunked)

This is slightly related. How contiguously growing files are allocated on different file systems: [http://www.sami-lehtinen.net/blog/test-btrfs- ext4-ntfs-simpl...](http://www.sami-lehtinen.net/blog/test-btrfs-ext4-ntfs- simple-file-allocation-tests)

<comment><USER7> On the other hand, your worst fragmented case still gets ~200MB/s with a _random_ read, which is around the _best_ case with a _sequential_ read for most HDDs today. A 4k random read on a HDD will be 1-2MB/s at most.

Relatively speaking the SSD slows down to ~50% of its max speed with fragmentation, but the HDD will be down to around 1%. So fragmentation affects SSDs somewhat, but HDDs are affected much more severely.

(Which SSD was it, and how was the test setup? That's important for comparison purposes, as the layout of the filesystem blocks and how they correspond to the NAND eraseblocks/pages has a huge effect on what fragmentation will do.)

</comment></comment><comment><USER8> Related, I'm doing a FAT32 driver for embedded systems (fully asynchronous!). It's part of my APrinter firmware project: [https://github.com/ambrop72/aprinter/tree/master/aprinter/fs](https://github.com/ambrop72/aprinter/tree/master/aprinter/fs)

Currently it has good read support and limited write support (can re-write existing files but not append or create new files).

Before writing that code I made some prototype read-only code in Python, to make sure I understand the FS structure properly: [https://github.com/ambrop72/aprinter/blob/master/prototyping...](https://github.com/ambrop72/aprinter/blob/master/prototyping/fat.py)

<comment><USER7> Embedded as in "32-bit ARM running Linux", or "8-bit microcontroller"? Either way, as someone who has written a FAT driver for embedded systems in the later category, that looks like it's far more code than it needs to be. Full read/write functionality can be done in approximately 800 (Z80) machine instructions. FAT is a linked list, and if you look at it that way, it doesn't take much code to manipulate one.

I've written a bit more about that before:

[https://news.ycombinator.com/item?id=7492318](https://news.ycombinator.com/item?id=7492318)

Append = find an empty cluster and link it into the chain for the file, then write into it. Create is similar except you start with a empty chain and also add an entry to the directory (which is like writing/appending to a file, because directories are files.)

When allocating next clusters you can reduce fragmentation significantly over the dumb "first fit" strategy if you scan the FAT to find contiguous free clusters and apply a next/best/worst fit. Even better if you add an API to allow tuning the amount of "gap" after a file when creating it, based on knowledge of how much it may expand in the future.

I believe that with good tuning and allocation heuristics, FAT32 can outperform the far more complex filesystems (ext*, NTFS, etc.) widely believed to be superior. One idea I've never gotten around to testing out is to modify the Linux FAT driver and do some benchmarking.

<comment><USER9>
       I believe that with good tuning and allocation
       heuristics, FAT32 can outperform the far more complex
       filesystems (ext*, NTFS, etc.) widely believed to be
       superior. One idea I've never gotten around to testing
       out is to modify the Linux FAT driver and do some
       benchmarking.

I don't understand. Has anybody ever claimed that the more complex alternatives were actually faster?

NTFS and other filesystems that followed FAT32 are "superior" because they support things like journaling and more robust permissions... things that unavoidably incur (a least) a small performance hit.

</comment></comment></comment><comment><USER10> This is a pretty neat concept; I've come across this some years back in bisqwit's video [https://www.youtube.com/watch?v=lxZyxxHOw3Y](https://www.youtube.com/watch?v=lxZyxxHOw3Y) \- he call's it "enfragmentation".

<comment> ryan-c Neat, I wasn't aware of bisqwit's hack. Looks like he supported FAT12 and FAT16 but not FAT32, whereas I only supported FAT32.

His has better status information.

</comment></comment><comment><USER11> Request for benchmarks: I'd like to see what effect this has on, say, WinXP boot time, or maybe some database benchmark. In fact, there's no need to get so fancy. Let's see how much this slows down computing a file's checksum, or maybe copying a file.

<comment> ryan-c (I wrote this horrible thing)

It's pretty horrendously bad on spinning rust - you get very, very close to 100% fragmentation, so the disk has to seek for each cluster. A lower bound average on seek time is probably something like 4ms, so your max transfer rate is going to be limited to 125 * cluster size. Depending on the disk size[0] the cluster size may be up to 32KB, so we're looking at maybe 4MB/sec best case. I'd guesstimate it'd increase boot time by somewhere between 10x and 40x.

0\. [https://support.microsoft.com/en- us/kb/140365](https://support.microsoft.com/en-us/kb/140365)

<comment> ryan-c In theory, you could make the disk performance even worse by alternating between the beginning and end of the disk, though you may need to do a little tweaking to ensure this doesn't inadvertently allow read-ahead to help.

<comment><USER12> I seem to recall that this was very bad juju for old HDDs, in that it would quickly wear out the mechanics of the RW arm.

<comment> ryan-c There are stories of _really_ old hard drives being made to move around a room with abusive disk access patterns.

[http://www.catb.org/jargon/html/W/walking- drives.html](http://www.catb.org/jargon/html/W/walking-drives.html)

<comment><USER12> "Some bands of old-time hackers figured out how to induce disk-accessing patterns that would do this to particular drive models and held disk-drive races."

Now that i would loved to be witness to.

</comment></comment></comment></comment></comment></comment><comment><USER13> Having been out of the FAT32 disk environment for a while, is fragmentation determined by non contiguous sectors on the drive? Do the methods reading data from the drives consider the number of heads/platters involved for performance gains? A file would not need to be contiguous necessarily per platter but some logic employed would map it to where following sectors would pass under a drive head at the same time.

Granted that would not work out for SSD, but I know next to nothing on their addressing

<comment><USER14> >Do the methods reading data from the drives consider the number of heads/platters involved for performance gains?

In general no, at least not since the early 80s. Although you still hear about cylinders, heads, and sectors, spinning hard drives have effectively been a black box to OSes for 30 years and will internally remap sectors wherever they feel like it (and lie about it if you ask them).

The result is that while you can be reasonably confident that sector 33566 is followed by sector 33567 and reading both will not involve seeking, things like reading the whole cylinders at a time are not worth the effort since you don't know where the sectors are.

</comment></comment><comment> iso8859-1 Could actually be useful for testing, maybe?

<comment><USER15> I can see it used to test defragmentation programs. Fragment the disk into random pieces and then run your defrag program on it and see how long it takes to organize it.

</comment></comment><comment><USER7> Would be interesting to see a version for ext* too.

</comment><comment><USER16> This could make for an excellent subtle LART, for when the more traditional ones can't be used.

</comment><comment><USER17> A fragmenter driven by the game of life with graphics feedback would be prety cool. :D

</comment><comment><USER18> So what happens exactly if you run this on Ext3/4, HFS, NTFS or other modern fss?

<comment><USER19> Probably fail spectacularly, as it seems to make modifications to the FAT32 data structures directly. A more generic fragmenter might interact with a file system via pathological file access patterns, but this doesn't take that approach.

</comment></comment><comment><USER20> Don't try this on pendrives or sdcards.

</comment><comment><USER21> It is against HN rules to merely comment about how awesome something is and not contribute to the conversation in any way.

Screw it, I can't hear your rules over how awesome this is.

<comment><USER22> > It is against HN rules to merely comment about how awesome something is

Why do you say that? Of course it isn't.

<comment><USER21> What, really? My bad.

<comment><USER22> _Empty comments can be ok if they 're positive. [...] What we especially discourage are comments that are empty and negative—comments that are mere name-calling._

[https://news.ycombinator.com/newswelcome.html](https://news.ycombinator.com/newswelcome.html)</comment></comment></comment></comment>


The 100 Oldest Companies in the World  - <AUTHOR> http://www.bizaims.com/articles/business+economy/the+100+oldest+companies+world <comment><USER2> This is not a very meaningful list. They just take these companies' word about when they were "founded." Often all that means is that there was someone in the same place doing the same thing. It doesn't imply any kind of organizational continuity.

<comment><USER3> There's something by Douglas Adams on matter & partical & energy & wave- particle functions and stuff.

He reckoned that 'stuff' is overrated, that of all the atoms that made up ksvs 10 years ago, virtually none make him/her up now. Whatever it is that you think you are, it's not the stuff you're made of.

</comment></comment><comment><USER4> This is a cool article but perhaps inaccurate data - the Wikipedia article on the oldest companies in the world has a many entries that this article is missing.

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

Wikipedia has 26 entries before 1300, the article only 6. Notably (the only one I'd heard of) Wikipedia claims the Affligem brewery started in 1074.

<comment><USER5> Apparently the author of the article did not read it before writing the title. It is a list of the 100 oldest family businesses. From the first paragraph:

"Below there's a list of world's top 100 oldest companies that _represent family business_."

</comment></comment><comment><USER6> Catholic Church?

<comment><USER7> No matter how much they would like to think otherwise, the Catholic Church is certainly not a family business.

<comment><USER6> No, no, no. I was going of the headline, which is misleading.

</comment></comment></comment><comment><USER8> The book _Peopleware_ has a statement about an old company that stuck in my mind for years as it's such a haunting image:

 _The few remaining employees of the Dutch East India Company (founded in 1651 and once the largest company in the world) now spend forty hours a week filling out paperwork..._

If this were true, they'd belong around #45 on the list. However, I once heard DeMarco and Lister (the authors) give a talk. Afterwards I went up to DeMarco and told him I'd always remembered that story and was wondering where they had gotten it, since they hadn't given a reference.

He looked at me for a second and said, "Did we say that?" I assured him they did. He paused again and said, "Huh. Usually we only make stuff up for our talks, not our books!"

(I don't have the book anymore, but the quote helpfully comes up in Google book search: <http://books.google.com/books?q=peopleware+dutch+east>. I had to add the last two words from memory, so they're just a paraphrase.)

<comment><USER9> The Dutch East India Company was founded in 1602 and was the first to issue stock. The company ended in 1798 when the government took over the company after it went into decline predominantly due to wars with Britain and France.

</comment></comment><comment><USER10> It's a very interesting list. I would like to learn more about the old Japanese firms listed.

As some of the comments accompanying that article noted, they did not mention the Hudson Bay Company, which was incorporated in 1670 and still operates. But they did claim to limit themselves to listing family firms.

It would be interesting to know if Japanese, Chinese, or Korean businessman had joint stock companies or something similar before they came about in Europe. I think the Chinese first did paper money. I read somewhere that Koreans have some ancient and sophisticated "lending club" tradition that may be the oldest expression of the idea of interest -- it is some sort of scheme whereby each member pays in a small fee each week, and a certain member receives all the money each week, determined by some formula.

</comment><comment><USER11> Specialty niche and/or very high end products.

So the only truly timeless business plan is luxury?

<comment> bjelkeman-again The (former) Swedish forestry company Stora Kopparberg would have been no. 5-9 on the list if they hadn't merged with a Finnish company in 1998. "Stora was, by one count, the oldest existing corporation or limited liability company in the world. Originally known as Stora Kopparberg, it was granted a charter from King Magnus IV of Sweden in 1347. The first share in the company is however dated already in 1288 and mining in the mountain had started possibly much earlier."

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

</comment></comment><comment><USER12> They're missing the world's oldest restaurant, in Madrid:

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

(I ate there last year, it was excellent!)

</comment><comment><USER13> Not to be confused with the oldest _professions_ in the world.

</comment><comment><USER14> So if you want to make a lasting impression, get into real estate or liquors.

If you fail, you have at least a roof over your head or a drink to keep you warm.

</comment><comment><USER4> The oldest one I had heard of was Zildjian (the cymbal maker) which dates from 1623. And they say Web 2.0 companies can't last with unpronounceable names!

<comment><USER15> I always thought it was a turkish word.

</comment></comment><comment><USER16> Weihenstephan, the world's oldest brewery, was founded in 1040. Their beer's nice too.

</comment><comment><USER17> 15 UK companies, including one in my hometown. Quite a respectable showing.

<comment><USER18> Yes, quite.

</comment></comment><comment><USER19> Where's Yahoo? In internet time, they're roughly 328 years old.

<comment><USER20> How d'ya measure internet time? Dog years, or what?

<comment><USER19> Dogs age more slowly than websites.</comment></comment></comment>


(iA)Writer Pro - <AUTHOR> http://writer.pro <comment><USER2> I really like the workflow concept and I hope it works well. But what professional writer on earth would find any value in this feature that they're so proud of, SYNTAX CONTROL™? This isn't a knock on iA Writer specifically. Writing and word processing apps have been touting this kind of thing for a long time—15 years ago it was Flesch-Kincaid scoring. This feature stuck around for ages (it's still there, I presume) despite the niggling persistent truth that for any given text written for and by fluent English speakers, increasing its 'readability' only made it more stilted, patronizing, and sort of... lobotomized.

So now there's a tool that highlights parts of speech. The problem is the same as the readability scores: the level of insight that an ordinary, untrained, consumer-level word processor can bring to bear on written English is completely trivial compared to the needs of any writer. The ability to load in vocabulary lists for what you think are parts of speech, like the ability to count word and sentence length (less so, frankly), is like the ability to detail a car with a sledgehammer.

Editing prose is a matter of taste and thus a very, very difficult problem to solve programmatically. I don't blame software developers for continuing to try. I laud them. But to bring this feature to market—indeed, to make it the centerpiece of your pitch? You have to ask what segment of the target audience would benefit. What dedicated writer is actually so adrift in the English language that they need a simple, boneheaded machine to hold their hand through the most delicate and important part of their workflow?

</comment><comment><AUTHOR> What's even more interesting than this rehash is the passing mention that they sold a whopping million copies of the original app.

<comment><USER3> What I've found is that it's not the best-designed apps that sell the most on the App Store. It's the ones that look "beautiful" in Apple parlance – overly simplistic, bare, and stripped-down, with nice icons and good marketing.

There's nothing that I saw in iA that I couldn't get with more functionality with vim or SublimeText and some LaTeX, syntax analysis, and Markdown plugins. There's also equally nothing in Writer "Pro" (attaching Pro to the end of a consumer product seems to be all the rage these days) that seems even remotely more useful than the previous iteration. It's a simplistic and stripped-down editor that has a nice typeface and color scheme, but why does it cost _$20_? There's no advanced story organization features, there's a very rudimentary tree functionality for branching by headings, but you can't jump to a heading, branch them into subtopics, attach object names to them, or anything cool like that. There's little distinction between the 4 modes, and I don't see the value in not integrating the features into only 2 – writing and reading. Most people don't write drafts, edit, and then edit more – they edit while they draft, and then perform several revisions instead.

The syntax analysis looks pretty neat, but for those with above-average vocabularies and half-decent grammar, it doesn't seem to offer anything truly revolutionary.

At least not revolutionary enough to sell a million copies, and especially not at the price they're charging.

<comment><USER4> Unsurprisingly there are good emacs scripts that perform all of the revolutionary features in this product [0].

However there's something about emacs that keeps it from being sold as a viable consumer product...

[0] [https://github.com/bnbeckwith/writegood- mode](https://github.com/bnbeckwith/writegood-mode)

 _Update_ : added example link

</comment></comment></comment><comment><USER5> When I write, a have a lot of difficulty not revising everything I write instead of moving on to further content. I'm curious to see if how strong the modes are in the interface will help me keep to one writing mode rather than getting stuck revising.

</comment><comment><USER6> As a rule of thumb, I only buy apps if they have an accented, tousled hair developer doing his best Jony Ivy impression to create an artificial need.

</comment><comment><USER7> it barely warrants paid upgrade period.</comment>


Show HN: Seven Words – An easy way to receive large files - <AUTHOR> https://sevenwords.net <comment><USER2> Hmm I'm thinking people can sign up for Dropbox or Google Drive instead and transfer via them?

The website seems easy to understand, I like that. Something that's a bit unclear to me is how will I pay? It costs money, but nevertheless _" There's no sign-up or hassle for either of you"_ ?

Another thing that comes to my mind — what about privacy? I don't know who you are. Likely there's something important in the file that I don't want unknown people to have access too. — Google Drive feels safer in this regard, feels as if I know who Google "is" and it doesn't have any interest in looking inside my large files.

How large files b.t.w.? 1 GB? 1 TB?

If you want feedback from more people, you can try [https://usability.testing.exchange](https://usability.testing.exchange) (I'm developing it).

<comment><AUTHOR> Thanks for the feedback and for the kind words.

You certainly can ask people to sign up for Dropbox or Google Drive and a lot of folks do. It can be a bit of a side-quest if you just need them to send you a file so you can get to work on something. I've tried to make this easier to explain to the person you need a file from.

If you exceed the free tier, you'll be prompted for payment. Payment is associated with your email address, which you would enter anyway to get a link, so no additional sign-up is required. More convenient than that, I think, is that the person you are requesting a file from doesn't have to sign up for anything.

The file is encrypted in transit and at rest, but I think these are only basic measures. I agree that you shouldn't trust some guy from the Internet (including Google, perhaps). If the information to be sent is sensitive, I would recommend taking measures suitable to the level of sensitivity before sending it, probably encrypting it with keys you control rather than depending on the service provider.

Right now the size limit is 25GB, but I'm open to suggestions on that. Of course there has to be some limit, but I wanted to make it high enough that it didn't feel like there was one for most folks.

Thanks for the link. I'll check it out :)

<comment><USER2> Ok thanks for the explanations. Yes in some cases this seems like simpler than Google Drive etc. — I'm wondering though, if that's enough to make people want to try this. I've never sent a file larger than what I can already do via Dropbox etc.

Maybe people who send 10 - 20 GB files typically already have Google Drive accounts or something like that? .... They're not "normal" people. I've been developing software for 10+ years and never had the need to send that large files.

I agree about encryption, I would probably encrypt something also before uploading to Google. (In fact I do, already, any important stuff of mine.)

Book tips: [http://www.startupwerkboek.nl/startupcenter/Momtest.pdf](http://www.startupwerkboek.nl/startupcenter/Momtest.pdf) — it's about how to find out if a service like Seven Words is needed, without writing any code. The i.m.o. "most important" part is free: the first few chapters.

Best wishes anyway.

<comment><AUTHOR> Thanks for the additional feedback.

I agree that folks who commonly send large files probably already have found a good solution for it. There are a variety out there.

In my own case, I sometimes send large files but at least as often ask someone else to send /me/ a large file, typically someone who doesn't often send large files. That turns into a phone call in which I explain to them how they can sign up for a service to send me the file. Sometimes the file ends up coming on a USB stick.

Seeing that Randall Munroe had even made fun of my struggle was the last straw and I decided to build something :)

Thanks for the link. It was a delightful read.

</comment></comment></comment></comment><comment><AUTHOR> Inspired by [https://xkcd.com/949/](https://xkcd.com/949/) and [https://www.xkcd.com/936/](https://www.xkcd.com/936/)</comment>