HNHacker News
TopNewBestAskShowJobs

krenel

175 karma · joined May 27, 2012

Jan Carreras Prat

Email: contact@jcarreras.es

submissionscomments
krenel··on Go + Services = One Goliath Project
IMHO the affirmation of

> Go is faster to iterate

holds true considering the total lifespan of the project. Golang is more explicit thus requiring more time to define every type but I've never refactored so fast and safe a codebase. In Python the fact that is dynamic makes it more difficult to safely iterate over it (is more statically-typed Vs dynamically typed). About error handling, it's not perfect, but the code is readable, easy to follow and easy to reason about.

> Iteration in go is simply harder as you have to be more explicit rather than sketching something out.

I will completely agree that prototyping in Python is way faster. Python is my preferred language for throwaway/prototype code.

> Where do you get this idea from?

It's solely based in my experience. I hope it contributes to the conversation.

krenel··on Go + Services = One Goliath Project
100% agree. We've just finished to roll out our implementation in Go migrating a subsystem from PHP and receiving around 150req/second and demultiplexing those request to 1500-2000req/second to legacy backends.

The key to the success of the project was that the API was an exact match, and we could compare both implementations for exact requests. The deploy strategy of the new version:

- Reply the real traffic to the new Go service comparing the results with the old one - Then implement a toggle feature than enabled different traffic sources to use one backend or the other - Keep changing backends to the new system and ensure that metrics were unaffected

Having e2e and integration tests for the Golang project was of a huge help, since we could fix all differences using TDD.

Although we changed some of the implementations to take advantage of Go constructs, just a 1-to-1 replacement would have had a huge performance impact.

krenel··on HTTP Cats
> Resta prohibit explícitament per la ICANN la utilització del domini .cat per a pàgines de gats (cat en anglès), llevat que siguin en català o tinguin a veure amb la cultura catalana.

It's explicitly forbbiden by ICANN the use of .cat domain for pages about cats, unless are in catalan [language] or it has to do with catalan culture.

[1] https://ca.wikipedia.org/wiki/.cat

krenel··on Ask HN: What is the first thing you implement at a new company?
Your comment resonates with me.

I work hard to improve things; most of it was worth it, some of it didn't went well but it was a constant fight with my boss. If I failed, he would bring it back for months.

What worked for me was to step back and get into super pasive mode. Give all the responsability to my manager. I didn't question any of his design decisions, gave support to all ideas even if seem plain wrong unless he wanted honest feedback (usually, he didn't because I would change the original idea). Never say or even insinuate "I told you this was not gonna work"; I just acted surprised and asking to him "ok, what do we do now?". It just took a few months for my manager to start reliying on me, more and more. Now I have even more space for improving things, with the full support of my manager because "he wants me to do it" not "because I push my ideas to him".

At the end of the day, it's not dumb if it works.

krenel··on I want a text editor that is a pain in the ass
> Writing lots of code quickly is not a good thing. You shouldn’t be writing more than a few lines of code per day.

Some studies says that on average a programmer writes a few lines per day. So OK.

> And if your editor is helping you write a lot of code really quickly, it’s encouraging you to write bad code.

Are you implying that being able to write faster results in more code produced ergo lower quality code? Usually being able to write/refactor/replace/etc faster means you have less friction between the code and your thoughts. You can more easily express what you have in your mind, in the code.

> Why? Because it puts pressure on me to refactor.

Make a refactoring without the right tools can be counter productive. Try to refactor a 400 lines of code of Python with Notepad. You will only detect the errors on run time, I promise.

> I don’t want my editor to refactor my code.

As far as I know, you editor does NOT refactor you code. YOU are the one who does it. The editor is just a tool that allows you to do it without pain, preventing common errors and helping you to do your jobs, no the other way round.

And not just that. Any good editor should do syntax highlight for you (you are more productive, but this does not imply to write more code). And automatically indenting. And maybe balancing the braces. And a long etc.

The editor is a tool. Any professional should use the right tools for doing its job. Is your best tool a pain-in-the-ass editor and you can do a good refactor as fast as your team mates? Good for you! :D

krenel··on Snowden is 'not on plane' to Cuba
Not just that. All that has being said by the US media, and all the oficial information released the Govermen is directed to US citzens, without really talking about the world wide implications of the problem.

I'm from Spain. Are we being spyed? Since we have seen too many times that non-american people (even not being in the US) do not "enjoy" the most basic rights in the US... what can we expect?

krenel··on Evidence of Turkish state violence in pictures
> But wait, maybe this was manipulation on the photographer's part (know to happen) and the policeman did it by accident?

As always you can not now if this exact photo, in its context, had a reasonable explanation. The thing is that the OP shows tens of photos of people highly injured and it cannot be "just coincidence" or bad faith from the photographer.

This photos remembered me the demonstrations here in Spain. Police brutality looks exactly the same. What a shame.

krenel··on Fastmail Failed
Same here. Really happy with the service and though I don't make intensive usage of mail I have the Enhanced account[1]. Everything works like a charm, it's very customisable at all levels, I've imported successfully all the emails from my old gmail account and is fast as hell. The service really looks promising.

And about the tech support, I've sent a few mails and they have answered me properly. Sometimes the mail was the tipically pre-made made one though. But it have detailed information about how to solve my problem, so that's cool.

[1] I'm using the 2 month trial. I haven't introduced the credit card yet. Even paying an account is sooo cheap.

krenel··on Show HN: I've used Go to build a daemon for the Raspberry Pi
Hey, I have a project similar to groundcontrol but un Python, is called RaspCTL[1][2]. You add/execute commands thru a web interface, radio support (using mpd), can manage the daemons, dashboard with the memory usage/processes, processor temperature, etc...

And just right now I'm working on an alarm system, where you'll be able to launch any arbitrary commands or start/stop playing a radio. In a few days I'll release the new version.

BTW, for the ones who have a dynamic IP and want to use a Dynamic DNS service for being able to access to your RPi from the internet, you can check this out[3].

[1] Official site: http://raspctl.com/ [2] Repository: http://code.krenel.org/raspctl [3] http://ip.raspctl.com/

krenel··on Poll: HN Linux users, what desktop environmemt do you use?
+ gmrun + xfe + tilda + unclutter + parcellite. Yep, I know there are not desktop managers but are the perfect combination with Openbox+Conky+Tint2.
krenel··on Checkboxes that kill your product
> For the love of god, what is wrong with having an Advanced options panel?

The OP seems to think about the average user and decides that a lot of stuff is not needed in Firefox options. But the average user does NOT click on Advances Options in any case. To be fare, the average user do not click on Preferences at all.

Is not bad idea to have some of this options as plugins, though. But we must remember that if the "average user" clicks on "Full screen" button (or even worse, F11), he/she'll probably have to reboot the computer in order to "fix" de computer.

krenel··on Google removes AdBlock for Android from Google Play
I understand your point but in my case I don't like Ads and the propouse of the ads itself - they hack you brain and make you to buy things you problably don't need and you are not aware that even exists. Like everybody that surfs the internet nowadays, I have the "Brain-Ad-Filter" but that don't means that some Ads can be really annoying sometimes.

Not having AdBlock installed means that you are OK with the Ads and Ads Companies because you are not opting out.

The only downside is that the content creator is not receiving a little amount of money for my visit. That's right. And it's a pitty. But, most of the time, I would not pay parsonally most of the pages I visit with my money, and the fact that the creator of the content gets paid by a Ad company thanks to an arrangement that have done is something I don't care. If you really like the content of a page and you want to reward the author, send him some real moeny, or a beer (I have done it and it's awesome!).

krenel··on First 5 Minutes Troubleshooting A Server
> why not use one simple and concise awk statement which does it all in one go? >awk -F: '{print$1}' /etc/passwd ps -ef | awk '/[h]ttpd/{print$2}'

IMO is easier to type the "grep/grep -v" statements than the awk ones. Usually we are more used to use grep and we add pipes and filters until we get the expected result.

I'm using zsh and thanks to the Global Aliases I can do, though: $ ps -ef G something GV grep GV ownpid

krenel··on Google removes AdBlock for Android from Google Play
> I don't use ad blockers, so I know just how awful many ads are. What is your reason for not using AdBlock?

> [...] I wish people would use it more carefully. What does "carefully" in this context means?

These are genuine questions. I always recommend AdBlock to all my friends and everybody is delighted with it. I would like to have a point against AdBlock, though. Some times people come to me to install "that wired program that removes Ads in youtube"... you know what I mean.

krenel··on How I spend my first 5 minutes on a server
I had to do that and enabling the forwarding of the authentication agent with the -A option in the ssh client was very handy:

$ ssh -A -t office_user@office ssh production_user@production

I have the same private key in all my machines, so this worked transparently avoiding the IP restriction of iptables of the production machine.

krenel··on How I spend my first 5 minutes on a server
I prefer the "adduser" way (easier to remember):

$ sudo adduser username sudo

krenel··on Torvalds clarifies Linux's Windows 8 Secure Boot position
As rplnt as said: > but apparently it's beneficial for them economically to only sell Windows machines

Maybe in Vietnam it happens just the opposite. It's easy to sell a computer _without_ Windows that with it.

I don't get why the companies cannot sell "empty" laptops without OS installed, thought.

krenel··on 180TB of Good Vibrations – Storage Pod 3.0
Or 1 bit flip could corrupt and entire 128 bites block of AES encrypted data. Openssl would complain when trying to decypher the file giving a "bad magic number" error.

BTW, keep up the great work guys!

krenel··on Ask HN: Best developer laptop under $1700?
I recommend you to buy the SSD and the extra memory at Crucial. The price is very competitive and the hardware very good. I have both 8 gigs of memory and 128 SSD and I'm very happy with it.

The other think, that is a personal preference, is the size of the keyboard and the keys. There are some laptops that have a small size of a key and this is not the best kind for programing. The Lenovo keyboard are one of the best out there (well, in MO, but it's the opinion of a lot Lenovo owners) and you shuld really give it a shot.

I recommend you the series X of Lenovo and the X230[1] if you want a small but powerful laptop (12.5''). This is the one I'm using and I'm very happy with it. And if you want something bigger take a look at the X1 Carbon[2]. If you buy the SSD and the extra memory in Curcial instead of Lenovo you will save some bucks.

[1] http://shop.lenovo.com/SEUILibrary/controller/e/web/LenovoPo... [2] http://shop.lenovo.com/SEUILibrary/controller/e/web/LenovoPo...

krenel··on Perfectum Dashboard
Very beautiful theme but when I'm on the page my CPU starts consuming 25% (100% of one core). That's insane!

If I move to UI Features the CPU usage is 30% because the Progress Bars. When the animation stops, the CPU is on a constant 6-7%. When using the sliders from the UI Features, the CPU is 31% again. As I said: insane.

I think it's very important to understand that you (the creator of a web framework) don't own the CPU of your users. Using a 5%-10% ocasionally should be the maximum allowed, because the user will be doing other stuff at the same time, and we don't want to leave the computer unusable and a very slow browser.

(Note: I'm using Firefox 16.0.2 under Debian/Testing.)

krenel··on Be nice to programmers
Not really. I have been developer of VoIP application for about one an a half year and our clients only call us when they have a problem. Conectivity problems, delays in the audio when doing calls (due codec errors), problems with NAT, problems with the voice mails, etc... If everything is fine you just see no errors on logs and a beautiful graph expressing the increase of number of calls every month. Anything else.

Same when I was working generating telephonic bills for the clients. You will only have feedback if something went wrong.

Is that satisfaying? For my its enough; if the work have been done fine and the clients are reporting (almost) any error, I'm happy with that.

krenel··on Dear Internet: please move the share buttons from the web page to the browser
In Firefox you can use the plugin Share Me Not that prevents third-party buttons embebbed by sites from tracking you until you actually click on them.

This plugin don't remove the social buttons from the page, just disables them.

Thanks for the Antisocial AdBlock list btw!

krenel··on A worthy Ultrabook appears: the ThinkPad X1 Carbon reviewed
My expirience (x201 Lenovo laptop) with external monitors is excellent. I use 'grandr' for setting up the VGA display and I'm used to work with the maximum resolution supported by the laptop (2048x1536) and works smoothly and fine.

Sleep mode and WiFi works natively too. I have had some problems with hibernate mode but I'm not using anyway. The only think you cannot use under Linux is the fingerprint reader. Everything else works like a charm.

krenel··on A worthy Ultrabook appears: the ThinkPad X1 Carbon reviewed
Usually Lenovo laptops have a very good support for Linux. I have a x201 and everything works perfect under Debian/testing. I encourage you to give it a chance.
krenel··on Company withdrawing from Facebook as analytics show 80% of ad clicks from bots
But at the same time is very normal a change of name, because companies adquires other companies, products can change the name too[1], etc... The Facebook page is supposedly owned by the creator, not Facebook and if a change of the name is needed, IMO it does not make sense to try to charge money from it.

I'm with you that F must have some restrictions on name change, but it does not seem reasonable to charge money for it.

[1] Imagine a page called "Sun Microsystems - Java" before being buyed by Oracle with a fer thousands fans. I'm sure a hight percent of the fans would not care of have a name change to "Oracle - Java" for example.

krenel··on Try It Quiet
> - unorganized

The OP says: "The talk was pushed up 24 hours as another speaker missed her plane to the conference and we had to do a last minute shuffle (literally, I found this out at midnight the night before).". It WAS unorganized.

> - jittery typing

The guy was very nervous and I would make a lot of mistakes if 20 o 30 people were watching me coding.

I agree with you that is important to have a plan, objective or whatever. It's important to know what he was doing, for the guys who started seeing the "talk" and the guys who join the "talk" in the middle.

← PreviousPage 2 of 2