HNHacker News
TopNewBestAskShowJobs

Luyt

3,269 karma · joined July 21, 2009

Software developer, Netherlands. motoom@xs4all.nl Python, C++, C, and others.
submissionscomments
Luyt··on Front End Technical Interview Best Practices
Nope, I used to be somewhat nervous too, when someone was watching me. Not knowing where to begin, doing things slower than normal, losing my train of thought, etc... I did two things to overcome this: 1) showing people source code on my laptop while browsing, navigating and explaining it, and 2) develop new features in a coffee shop with lots of people around. I guess I found the nearby physical presence of someone distracting - but not anymore.
Luyt··on Dear open-source maintainers, a letter from GitLab
I just installed Ansible on a workstation and started playing with it to configure a server (the server only needs SSH). Or, use this guide:

http://www.ansible.com/get-started

Luyt··on Drupal: 15 years old
What's your opinion of WordPress?
Luyt··on Ask HN: Getting back into programming with a hacker’s mindset?
The word "professionally" suffers from the same ailment. To some, it means that you earn your living with it; to others, it is a measure of quality. And what 'quality' means also differs from person to person...
Luyt··on The Amiga Demoscene Mixtape Vol. 1 [video]
It was this kind of demo-scene programming in which DHH was utterly uninterested in.

"I had a bunch of friends who I loved dearly, but in many ways were exhibiting all the traditional programmer stereotype themes of being just overly focused on things I didn't think mattered and at that time programming perhaps also was a little bit different. Growing up, programming was assembler and C. I had a lot of friends in what was called the ‘demo scene’, which is mostly an European thing where you had all these guys on the Commodore 64 and on the Amiga writing these really awesome visual displays of various kinds, and all that stuff was usually in assembler. I had absolutely zero interest in learning or doing anything with assembler, it just didn't make any sense to me at all.

I only really got interested in programming when I stumbled across languages that made sense to me on the level that makes sense to me, which is at the very least high level languages like Java, PHP, or whatever have you, anything that's above the “I have to dick around with pointers” or I actually have to move memory spaces around; that stuff has absolutely zero interest to me at all.

I didn't start programming until I was in my late twenties, and even then I didn't start programming because I wanted to be a programmer. I started programming because I wanted a few programs. And that was apparently the easiest way to get there because the other way of getting programs is that you actually have to talk to programmers, which is surprisingly painful at times. I found that the easiest way was just to pick it up and learn it myself."

Source: http://www.transcribed-interview.com/dhh-rails-david-heineme...

Luyt··on 36TB FreeNAS Home Server Build
Yes, multiple backups, kept at remote places. Don't store the backup in the server room! ;-)
Luyt··on The Zappos Exodus Continues After a Radical Management Experiment
I've noticed that often one man can accomplish more than a whole group, especially if the group gets larger.
Luyt··on A statement from f.lux about Apple's recent announcement
That's correct. Way back in the 90's I was tweaking the VGA color palette registers of my MSDOS computer to make the colors more easy on my eyes at night. I never released that small program...
Luyt··on So You Think You Can Program an Elevator
Nice link! The problem has been solved, by the way: http://physics.stackexchange.com/questions/2072/on-this-infi...
Luyt··on dd built-in progress introduced in coreutils 8.24
I find this style of formatting specifiers an eyesore:

    fprintf (stderr,
            _("%"PRIuMAX"+%"PRIuMAX" records in\n"
              "%"PRIuMAX"+%"PRIuMAX" records out\n"),
            r_full, r_partial, w_full, w_partial);
Luyt··on Forbes asked readers to turn off adblockers then immediately served them malware
Indeed: they serve Google different pages than ordinary visitors. When I set my user agent string to "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) " suddenly forbes.com doesn't object to my adblocker anymore.
Luyt··on Forbes asked readers to turn off adblockers then immediately served them malware
I think uBlock does this out of the box.
Luyt··on New string formatting in Python
Ok, but this only works for literals.
Luyt··on Show HN: FuckFuckAdblock
I'd like an ad blocker which retrieves the ads as an unprotected browser would, but doesn't display them on the screen. That will stop some sites nagging me that I must turn off my ad blocker to see the content.
Luyt··on Goodbye, Cameras (2013)
Indeed, more pixels doesn't necessarily mean more quality. A Canon 400D (10 Mpixel) with a kit lens has only an effective quality of 6 Mpixel.
Luyt··on Goodbye, Cameras (2013)
You'll never get good bokeh from a tiny telephone lens. A big (and fast) lens is needed for that. There are laws of optics that will ensure cameras will never disappear ;-)
Luyt··on Teaching taste
Even before I took up programming, I used indentation: on my TODO lists, and outlines of ideas. Using indentation is very obvious when you want to group lines of text and/or express different levels of hierarchy.
Luyt··on India's Forgotten Stepwells
"Indiscriminate dumping of toxic solid waste along the road, discharge of sewage, and construction of buildings, railway stations and a new road to connect Old Mahabhalipuram Road and Pallavaram have shrunk the wetland to a great extent."
Luyt··on COBOL Leads Us Back to the Future (2015)
The next step is obviously 'functional COBOL'.
Luyt··on Congo looks to insect farming in fight against hunger
How safe is insect consumption, compated to fish and meat consumption?
Luyt··on How we spent two days making Perl faster
This is exactly why I wonder why some companies write things such as 'must be passionated about Java' in their job postings.

After all, programming languages are just tools. What really matters is the applications you create with them, and that people will find your application useful and use it with pleasure.

Luyt··on Microsoft to stop producing Windows versions
I don't think they will do that, since the Linux kernel is GPLed.
Luyt··on How World of Warcraft led to Glassdoor
I started WoW in december 2005, and hit 60 in februari.

Also, when you reach max level, doesn't mean you finished the game. There is tons of instances to do, special loot to earn, and other stuff; even in 2006.

Luyt··on Ruby-like string interpolation in Python
Some of the examples in that SO post are outdated. However, list joining is faster that string concatenation, but not by much. Assembling a 110 MB string:

    from timeit import Timer
    try:
        from StringIO import StringIO
    except ImportError:
        from io import StringIO

    nr = 1200000
    data = "The Quick Brown Fox Jumps Over The Lazy Dog: Woven silk pyjamas exchanged for blue quartz.\n"

    # contruct a list first, then join
    def dolist():
        s = []
        a = s.append
        i = 0
        while i < nr:
            a(data)
            i += 1
        s = "".join(s)
        print("%s chars (joined list)" % len(s))

    # string concatenation fest
    def dostr():
        s = ""
        i = 0
        while i < nr:
            s += data
            i += 1
        print("%s chars (string concatenation)" % len(s))

    # use a string as a file
    def dostringio():
        buf = StringIO()
        w = buf.write
        i = 0
        while i < nr:
            w(data)
            i += 1
        s = buf.getvalue()
        print("%s chars (cStringIO)" % len(s))

    if 1:
        tlist = Timer("dolist()", "from __main__ import dolist")
        print("the joined list took %.2f seconds" % tlist.timeit(2))

        tstr = Timer("dostr()", "from __main__ import dostr")
        print("the concatenation fest took %.2f seconds" % tstr.timeit(2))

        tlist = Timer("dostringio()", "from __main__ import dostringio")
        print("the cStringIO approach took %.2f seconds" % tlist.timeit(2))
    else:
        @profile
        def callall():
            # For use with a profiler (eg, kernprof.py/lineprof)
            for i in xrange(2):
                dolist()
                dostr()
                dostringio()
        callall()

    Result:

    (user@air) /Users/user/Prj/python $ python3 stringplakbenchmark.py
    109200000 chars (joined list)
    109200000 chars (joined list)
    the joined list took 1.12 seconds
    109200000 chars (string concatenation)
    109200000 chars (string concatenation)
    the concatenation fest took 1.76 seconds
    109200000 chars (cStringIO)
    109200000 chars (cStringIO)
    the cStringIO approach took 1.45 seconds

    (user@air) /Users/user/Prj/python $ python2.7 stringplakbenchmark.py
    109200000 chars (joined list)
    109200000 chars (joined list)
    the joined list took 0.99 seconds
    109200000 chars (string concatenation)
    109200000 chars (string concatenation)
    the concatenation fest took 1.33 seconds
    109200000 chars (cStringIO)
    109200000 chars (cStringIO)
    the cStringIO approach took 5.21 seconds

    (user@air) /Users/user/Prj/python $ python2.6 stringplakbenchmark.py
    109200000 chars (joined list)
    109200000 chars (joined list)
    the joined list took 0.95 seconds
    109200000 chars (string concatenation)
    109200000 chars (string concatenation)
    the concatenation fest took 1.39 seconds
    109200000 chars (cStringIO)
    109200000 chars (cStringIO)
    the cStringIO approach took 5.54 seconds
Luyt··on The new MacBook
I like the Dorian Gray reference.
Luyt··on USB Typewriter
I remember having a daisy-wheel printer at the office. It gave nice, crisp, typewritten and kerned output. Much better than the matrix printers. (This was before laser printers became commonplace).
Luyt··on Signs that you're a bad programmer (2012)
I guess it was visual code inspection... Staring at the screen for hours, trying to figure out why the code doesn't work, while it should work.
Luyt··on On Secretly Terrible Engineers
Reading the original problem, "Write a function that returns the sum of the two largest numbers in an array", I took the liberty of assuming that the input list would always contain at least two items.
Luyt··on On Secretly Terrible Engineers
Thanks for the tip!

    a = [2, 7, 8, 9]

    highest = nexthighest = None

    for item in a:
        if not highest:
            highest = item
        elif item > highest:
            nexthighest = highest    
            highest = item
        elif not nexthighest:
            nexthighest = item
        elif item > nexthighest:
            nexthighest = item

    print highest + nexthighest
Luyt··on On Secretly Terrible Engineers
Okay, but real engineers can rely on the quality of their building materials, like mortar, brick, concrete and iron, with constant quality through decades or even hundreds of years.

Contrast that with the building blocks the 'software engineer' has to work with. Microsoft might upgrade some DLLs your product depends on, overnight. Will your product still work? Your application probably relies on components written by others. Are they infallible? Can you even inspect the components for defects?

I sometimes have the idea that software is built upon quicksand, and the building blocks can and probably will change before the project is completed.

← PreviousPage 2 of 34Next →