HNHacker News
TopNewBestAskShowJobs

istvan__

656 karma · joined October 30, 2014

submissionscomments
istvan__··on Why Go is doomed to succeed
This is a very light article with not too much information. Go already succeeded simply because Google uses it. This means all of the problems they need to solve in Go has decent support (net/http etc.) and you can just use in your own projects, and this also means that the out of the box performance is decent. These are good enough reasons to use Go. If you are talking about language features I don't think that Go is that amazing. Supporting CSP is a big win though.
istvan__··on Ask HN: What are your favorite code problems to give while interviewing?
Sorry for the terrible spelling, I was in a rush.
istvan__··on Ask HN: What are your favorite code problems to give while interviewing?
This is a great topic.

I like to split my interview to the following steps:

- introduction, small talk about the company or the candidate - level 1 write a function that flips a bit that is represented as a single digit integer: (0 -> 1, 1 -> 0) flip two variables (int) without a third one: (a,b -> b,a)

- level 2 what is the runtime complexity of a nested loop (assuming n == m) lease write a function that returns the list of numbers (in a string representation) that are permutation of N digits, where digits are 0..9. (1 -> 0..9, 2 -> 00 01....98 99 etc.) please explain recursion

- level 3 99% of the candidates do not make it to here I guess I should just make them flip that binary tree over the phone. :)

This is basics I think, so most of the software engineers should be able to solve these, even with a little hint.

On the top of these artificial tasks I usually ask them what is the biggest system they contributed code to, what was the contribution. What tools are they using. What is the favorite language and why. How do you to performance profiling for your code. What was the last problem that you solved in production, what was the problem and what is the solution.

And few others.

istvan__··on Haskell for OCaml programmers
Thank you for the detailed response.

OCaml is not my cup of tea either, but it is really interesting to learn it. If you have any ML like experience than I guess it is less interesting though. The toolchain is great this was one reason I decided to try it out.

istvan__··on Haskell for OCaml programmers
Well, I am using it mostly for CLI applications where multi core is not a problem, but the type system is a bliss. An we can just compile to native or bytecode and deploy a single file (just like Go). Does Haskell support CSP (channels, cooperative threads)?
istvan__··on Inverting Binary Trees Considered Harmful
This is the solution. The question I can't tell cause I agreed not to share. I guess there might be another way of solve it, but it does not take away the meaning here, asking very complex problem over the phone is not a good way of figuring out if the candidate would be great on the team.
istvan__··on Inverting Binary Trees Considered Harmful
Thanks for pointing out, my bad, fixed now. I meant Hamiltonian path. Guys might have leaked on Glassdoor among other questions.
istvan__··on Inverting Binary Trees Considered Harmful
Twitter interview went sideways, I got one shot with a question (that I won't share) that required finding Hamiltonian path in a tree, over the phone of course. I am not sure what is the mindset of the interviewer.

I am hiring engineers (systems, software and security) in the last 5 years, got trained up on recruiting by Amazon, so I would say I have a pretty good understanding on hiring.

The right approach with these interviews to find out the best of the candidate. In order to achieve that you always start with simple questions like what is a variable, what sort of data is out there, do you use version control etc. After that you switch gears.

On the subject of inverting binary trees on a whiteboard. Is this the core of your business? How many times did you need to do that last week? If it is irrelevant for your daily operations than why are you asking this question?

The problem is that (especially companies like Google) like to hire Stanford graduates and those guys think after being in the job for few months that the best way on interviewing is to measure how well the candidate would have done during the last semester in theoretical CS class at the university. While we probably all know that running a service for millions of users in production in a distributed environment requires many other skills that are not represented too much in the interviews, yet this is what you can run into during the interview loops.

I think at certain extent this is known to the Google recruiting team and they are ok with it. The way to beat the interview is to read books like Cracking the Coding Interview and train up extremely well on those trees and search algos and all, if you are really committed to work there. There are several very senior guys turned down by Google simple because they failed one or two of these ridiculous questions.

I think the last incident kind of a good example of this:

https://twitter.com/mxcl/status/608682016205344768

Now I get back to my read about how the heck I am inverting a binary tree.

istvan__··on Twitter’s CEO Dick Costolo Is Stepping Down
Exactly! I am pretty sure that they could monetize enough on the ads, I found twitter ads pretty relevant almost all the time, i don't even removing them with adblock.
istvan__··on Open-sourcing Facebook Infer: Identify bugs before you ship
I guess so. I am only familiar with the following in this category:

https://code.google.com/p/hunpos/

istvan__··on Open-sourcing Facebook Infer: Identify bugs before you ship
Yes you right, I am not exactly clear. My understanding of symbolic manipulation is the following (from wikipedia):

"In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expressions and other mathematical objects."

Now obviously if you have types in your language that make this easier than it is a win. I thought algebraic data types makes this easier. I might be wrong. On the pattern matching side, you are not concerned about the actual value of the variables in your expressions rather the patters those are matching to. That was my intention to show with the second URL in the previous comment, but again I might be wrong on that too.

istvan__··on Open-sourcing Facebook Infer: Identify bugs before you ship
I think one part of this is the OCaml type system. It just seems to be very suitable for symbolic manipulations. You can do a lot with algebraic data types.

http://en.wikipedia.org/wiki/Algebraic_data_type

The other feature that I personally think is great in OCaml is pattern matching. This can help you expressing computation on symbols, where usually you have few options for the input. See following:

https://github.com/facebook/infer/blob/master/infer/src/chec...

istvan__··on Open-sourcing Facebook Infer: Identify bugs before you ship
I am extremely happy to see Facebook using OCaml, it is good the get some more traction in that community. I hope it gains velocity over time and becomes a viable option especially for startups where there is no technical debt. It has amazing features and as you can see even very complex problems can be solved in a concise, terse way. Kudos to Facebook on this one.
istvan__··on National IPv6 launch day in Finland
How about?

^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

istvan__··on National IPv6 launch day in Finland
Just for the record this is not the regexp for matching IP addresses. It is for matching 4 multi digit numbers separated by dots.
istvan__··on National IPv6 launch day in Finland
Any of the down voters, do you care to share why you are down voting? This is the official development guide of Amazon as well.
istvan__··on National IPv6 launch day in Finland
Using hardcoded IP addresses in your code is a bad idea anyways.
istvan__··on Introducing Apple Music
This is literally the best content in this thread. I haven'd heard about this but this project is freakin amazing.
istvan__··on A year with Go
Yes, correctly exposed concurrency is a pretty amazing thing. CSP ftw! You could as easily do it in Clojure, Erlang or any language that supports that.
istvan__··on A year with Go
> The difference is that with Haskell or Erlang you get hard > guarantees about side effects, but access to imperative > libraries is very difficult.

Well yes, I can just live without imperative libraries because it is so natural to have single assignment (in the same scope) that I do it even in other languages. Accessing imperative libraries is possible though, just think about the C libs. What would you implement in Erlang the imperative way or which library do you miss exactly? The ecosystem is definitely smaller, but you can get support, some of the smartest software guys hang out on the mailing lists and IRc as well. I got absolutely amazing help from both when we worked on a Erlang project.

> It kind of depends what your priorities are, if > it's correctness or development speed.

Yeah and also how much fun you want to have. :)

Using Erlang is great but not many devs out there for hire, on the other side you have two seasoned Erlang devs they can do a lot. Contractors FTW!

Btw. what about using ASN.1 with Erlang? How does that change the correctness / development speed?

istvan__··on A year with Go
Depends the definition of IDE. My IDE is VIM. Why is it an IDE? Because it understand the text I am editing. An editor does not understand it. Anything, that supports programming on the top of an editor an IDE feature in my view. If you definition of IDE is IntelliJ than it is a different problem. I cannot edit Java without it anymore, Java is just too verbose and too many things can go wrong, I need immediate feedback from my IDE to tell me that I am doing it wrong also collapsing too verbose parts is a great thing. I don't use too much of IDE features but anything that I incorporated to my workflow over the years (very little, I keep it simple) is damn useful and I am pretty sure I would be slower without it.

Languages with small clean syntax do not require that much IDE usage, at least this is my experience. I never thought my Erlang workflow could be improved with something like IntelliJ. I guess having a REPL helps a lot.

istvan__··on A year with Go
Are you talking about Clojure? :) I am not sure what is the fuss about functional vs. imperative, you can do both in Clojure, both ways have a place in the programming toolkit. I think about functional programming as a philosophy. Nobody is going to despite me if I use swap! in Clojure or I use a mutable variable. On the other hand even when I am in an imperative environment I tend to use functions that keep the state in the parameters so the state is explicit and visible rather than a hidden something inside a class.
istvan__··on A year with Go
I am not sure your definition of upgrade, but it is definitely a downgrade in terms of features even comparing it to Java. It has lean environment that makes it more attractive to systems programming and the CSP (channels, go routines etc.) make it great for concurrency. The trouble starts when you are shifting from systems projects to business logic projects. This is where Java runs circles around Go (or for that matter several other languages/environments). I wish Go had similar type system like OCaml.

https://functionwhatwhat.com/go%E2%80%99s-type-system-is-an-...

If I would like to teach something smart to software engineers I use OCaml, if I want to teach how simple things can achieve a lot I use Go. (They gonna end up programming in Java or Python anyways :)) )

istvan__··on TripleSec – Symmetric Encryption in the Browser Combining AES, Salsa20, Twofish
This is really good.

I am curious if somebody could mitm the https layer with rogue ca and append more JS to the content. The problem I see as a non-expert with dynamic content that it can't be signed. If we use HTTP as it was intended we could just name the content after the sha(content). That way the client could validate the integrity. The problem with shipping computation to the client side that you lost the integrity verification and opened up the platform to all sorts of vulnerabilities. I guess we should just create a brand new protocol that supports stateful clients, it is network efficient and security is part of the design.

istvan__··on Let Snowden Come Home
Many of the CIA and other government agency employees sold secrets to the Russian. How about that? Or if it is for business reasons, it is ok, if it is pointing out the nature of the surveillance state we are living it is not ok.
istvan__··on TripleSec – Symmetric Encryption in the Browser Combining AES, Salsa20, Twofish
Thanks everybody, much value as usual!
istvan__··on TripleSec – Symmetric Encryption in the Browser Combining AES, Salsa20, Twofish
Somebody from the security community could shed some light on why this is a good/bad idea.
istvan__··on How Well Can You Hear Audio Quality?
Not to mention that I am more of a sound engineer who has a lot to do with sound quality while musicians care less about that, I know several musicians who could not setup even basic sound system. It is also pretty common that DJs (and other types of musicians) require the roads to help them to achieve the best sound of their music. The musician is in charge of the music, while the sound engineers are in charge of the sound. Quiet different subjects.
istvan__··on How Well Can You Hear Audio Quality?
Nope. I can pass the double blind test easily.
istvan__··on How Well Can You Hear Audio Quality?
I can hear the difference between mp3(320) and flac/alac easily on my stereo both in the car and in my room. The funny part is that you can easily recognize mp3 compression based on high it trims the high frequencies and the high hats are affected by it quite a bit. You can try different lossy formats but i guess it is just damage control. The only reason I use alac and not flac is because iPods only work with alac (and it is limited to 16bit, 44100Hz) and my car only supports iPods :(
← PreviousPage 7 of 14Next →