Hacker Newsnew | past | comments | ask | show | jobs | submit | more devjam's commentslogin

As was also pointed out in the TFA, while you may not be "marking people down" because of unfamiliarity with syntax, an interviewee who has more experience with the language (and it's debugging tools) used in the interview will have an inherent advantage over someone who isn't as familiar.


I agree, nice and thick, with lots of butter! Don't listen to the advice in the article :-)

> The trick is not to spread it thickly like peanut butter; instead, you take about a quarter of a teaspoon’s worth and scrape it thinly over the entire slice.


And if your main.go is in a sub-directory, e.g. cmd/pathto/cli/main.go:

    $ go run ./cmd/pathto/cli


From the Wikipedia entry:

> After his death Machiavelli's name came to evoke unscrupulous acts of the sort he advised most famously in his work, The Prince. He claimed that his experience and reading of history showed him that politics have always been played with deception, treachery, and crime. He also notably said that a ruler who is establishing a kingdom or a republic, and is criticized for his deeds, including violence, should be excused when the intention and the result are beneficial to him.


What a gem! And a few more from the HTML source:

    <META NAME="Keywords" CONTENT="entrances2hell, entrancestohell, entrances to hell, Hell, Canterbury, Kent,">
As well as a style tag missing a closing '>' on the page template:

    </style


I noticed this too. Would be a safe bet it was hand crafted in notepad with no syntax highlighting.

Might just feed it to the W3C validator for kicks.

Update: The validator reported 42 errors before giving up:

  Fatal Error: Cannot recover after last error. Any further errors will be ignored.
  From line 56, column 1; to line 56, column 23
  Verdana">↩<a href="page279.html">This w


> hand crafted in notepad with no syntax highlighting

Those were the days!


Save, open FTP/SCP client, copy to webserver, maybe poke/restart a service via SSH, back to browser, refresh... dammit, error, rinse repeat.

We're certainly spoiled having formatting, linting, tests and coverage all run on save these days :-)


> The validator reported 42 errors before giving up

Giving up? 42! How can you not see this as the sinister interference of Beelzebub!


42 hex in decimal is 66!


When did we stop explicitly welcoming people to websites (literally: “welcome to my website!”) . The same era that “going on the internet” was an actual activity. I miss that. It’s like we all stopped being excited by the web.


Everyone's a "brand" these days. I get the same kind of feeling when I see a bio written in the third person but which was clearly written by the person themselves.


>The same era that “going on the internet” was an actual activity. I miss that. I

Now you can never leave.


Content should speak for it self. Welcoming people to a website is same as starting a IM conversation with: "hi!".


Valid point, but there was something charming and innocent about "the welcome to my website" that I miss.


Practical Extraction and Reporting Language


The author used:

    sum := float32(0)
Over Go's zero-value default initialization e.g.

    var sum float32
A nit stylistically but wondering if there was a good reason to do so?


One advantage is that it makes the value explicit so anyone reading the code irregardless of their familiarity with Go will know it will be zero.


i do the same because i find the var keyword ugly


Sure, I understand that from the POV of making your code explicit. Personally I have always tended towards, for example:

    var x string
when initializing empty (zero-value) vars, versus:

    x := "hello"
when initializing variables that should hold an initial value.

To me as a Go programmer at least, this is more obvious and intuitive as to the intent of the declaration.


I feel the same way.

My commits on a PR are always rebased as I go, into one or two or at most three neat changes. Meanwhile (some) others I work with seem to have no problem creating PRs consisting of a dozen or more changes, most of which with messages like “wip”, “typo”, “fix comment” etc.


Don't forget the companion isEven function:

    func isEven(n int64) bool {
        return !isOdd(n)
    }


Wow you can call a function from a function ? It’ll revolutionize my productivity.


> The fact that the Python REPL provides a helpful hint seems like extra effort to make your life easier.

I agree; Python is actually helping you out here, since just typing `exit` doesn't actually call the callable.

Also, Python being Python, while not recommended, there's nothing stopping the user from assigning to `exit` then printing it in the repl:

    >>> exit = 42
    >>> exit
    42
What would the author expect Python to do in this instance?


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

Search: