How to build a news app that never goes down and costs you practically nothing

t’s an opinionated template for building client-side apps, lovingly maintained by Chris, which provides a skeleton for bootstrapping projects that can be served entirely from flat files.

Briefly, it ships with:

For a more detailed rundown of the structure, check out the README.

There’s a lot of work that went into this app template and a fair amount of discipline after each project we do to continue to maintain it. With every project we learn something new, so we backport these things accordingly to ensure our app template is in tip-top shape and ready to go for the next project.

Really cool template for creating static apps using Flask/Jinja, LESS/JST Bootstrap and Fabric.

Posted in Uncategorized | Leave a comment

Makefiles are machine-readable documentation that make your workflow reproducible.

The beauty of Make is that it’s simply a rigorous way of recording what you’re already doing. It doesn’t fundamentally change how you do something, but it encourages to you record each step in the process, enabling you (and your coworkers) to reproduce the entire process later.

I’ve been using Make like this on and off since my PhD. I could generate my whole thesis — analyses and pictures — just by typing “make”. It would download required files, run analyses, create the pictures (B&W or color, depending on an environment flag), and run LaTeX to create a beautiful PDF.

Posted in Uncategorized | Leave a comment

Celebrating Estonia’s independence at -16C

Posted in Uncategorized | Leave a comment

Hello, I am a compiler.

Hellо, I am a compiler.

I just scanned thousands of lines of code while you were reading this sentence. I browsed through millions of possibilities of optimizing a single line of yours using hundreds of different optimization techniques based on a vast amount of academic research that you would spend years getting at. I won’t feel any embarrassment, not even a slight ick, when I convert a three-line loop to thousands of instructions just to make it faster. I have no shame to go to great lengths of optimization or to do the dirtiest tricks. And if you don’t want me to, maybe for a day or two, I’ll behave and do it the way you like. I can transform the methods I’m using whenever you want, without even changing a single line of your code. I can even show you how your code would look in assembly, on different processor architectures and different operating systems and in different assembly conventions if you’d like. Yes, all in seconds. Because, you know, I can; and you know, you can’t.

P.S. Oh, by the way you weren’t using half of the code you wrote. I did you a favor and threw it away.

Posted in Uncategorized | Leave a comment

Xargs to run commands in parallel

I recently found out xargs had options to parallelize what it is working on. I finally had a good reason to try it. I’m processing log files for the last year. Each day is it’s own unique standalone task. My workstation is has 1 CPU with 6 cores that are hyperthreaded to give 12 logical cores. So… I asked xargs to run the processing script with 6 day log files and to run 10 processes in parallel. Zoom!
ls 2012*.tar | xargs -n 6 -P 10 process_log_files.py

Cool, I didn’t know that xargs can parallelize it’s work.

Posted in Uncategorized | Leave a comment

25 Things I wish I knew before moving to San Francisco

Media_httpihuffpostco_fofoi

Should I move to financial district, since I have a Dahon?

Posted in Uncategorized | Leave a comment

Hiding your research behind a paywall is immoral

Dammit, we’re scientists. Our job is to make knowledge. If we make it, then brick it up behind a wall, we’re wasting our time and our funders’ money – which ultimately means we’re squandering the world’s wealth.

Publishing behind paywalls is immoral. More than that, it’s oxymoronic: if it’s behind a paywall, it hasn’t been published. We have to stop doing it, now and for always.

Posted in Uncategorized | Leave a comment