HNHacker News
TopNewBestAskShowJobs

4ydx

73 karma · joined March 22, 2012

submissionscomments
4ydx··on 5 programming problems every Software Engineer should be able to solve
Here is my go at #4. It took me more time than I would like to admit :)

http://play.golang.org/p/CTZahLt7g1

4ydx··on Go-bootstrap: Generates a lean and mean Go web project
Values are values whether or not they are in a db. It is situation dependant and probably not (happily) manageable in a large scale application. Saying things are "impossible" with such a heavy hand is a bit over the top. If my cookies have a date that is valid, then I can easily keep that bit of nasty logic in the code. I wouldn't do that personally, but it is doable. Take it easy :)
4ydx··on Go-bootstrap: Generates a lean and mean Go web project
If we are dealing with a subset of bad cookies, then I suppose it becomes a hard question of what-to-do. We could put something into the code to distinguish and then require a minimum last good date of some sort. It is messy and I wouldn't want to do that, but really I just want to point out that your insistence on it being "impossible" just isn't true. If we just let ourselves revoke everything, then it is much simpler. I wonder how the "known subset of bad cookies" situation arises. I suppose it could, but you could in turn release an announcement telling your users that for all of their protection you are requiring that they login again, insert a minimum required date and move on with life. There are plenty of ways to deal with the situation and none of them are impossible.
4ydx··on Go-bootstrap: Generates a lean and mean Go web project
You could always, you know, change the code (which is simple) so that an "infinite" expiry date is no longer valid. Line 215.

https://github.com/gorilla/securecookie/blob/master/secureco...

As for "impossible to revoke" well if you have control over your server you can do whatever you like so this falls into the very not-at-all-impossible category. As a baseline as long as there is no personal information in the "secure cookie" there really is no issue at all.

4ydx··on Grepping logs is still terrible
My main problem with this is that ascii is not something that will ever change over time. The data format is wonderfully static. Forever. Introduce a binary format? You get versioning. It is a major downside.
4ydx··on Grepping logs is still terrible
A substring of text may or may not be a date and based on the excellent tools available in linux you can decide how to extract that "data point". If binary logging is little more than a stream of text, then that is fine, but I seriously doubt that is the push happening. Personally I prefer having a raw stream of data that I have to work with as best as I can rather than having to use some flag defined by somebody else to range across dates. That is the fundamental difference it seems: do you want a collection of tools that can be applied in a variety of ways or do you want the "one way" (with potential versioning... have fun!).

Again if the binary log is simply better compressed data, well we have ways of compressing text already as an afterthought. This really, fundamentally, seems to be a conflict in how people want to administer their systems and, for the most part, this seems to be about creating a "tool" that people then have to pay money for to better understand.

4ydx··on Grepping logs is still terrible
The link I included states that those are unique hostnames. Perhaps they are including subdomains on the same ip address, but you might note that rather than quoting the 1 billion sites, I reduced that by their estimated 25% being actually active. Additionally they state that there are on average 3 users per site in 2014. Maybe that doesn't mean anything, but as a rough estimate that all implies far more small sites than large ones.
4ydx··on Some Practical Thoughts on Suicide
Whether or not somebodies sense of depression is triggered by something "trivial" or "stupid", it is likely genuinely causing them distress. Personally I wouldn't pull my friend aside and say, "Hey man you seem down, but the fact that you just broke up with your girlfriend is a total BS reason to be upset". Perhaps we are only differing in the way we like to describe the situation, but your language comes across as being unnecessarily "macho".
4ydx··on Grepping logs is still terrible
Agreed. It makes one wonder just how much administration this person has actually done in their life.
4ydx··on Grepping logs is still terrible
Sounds like somebody in the systemd camp. I really dislike added complexity when it is totally unnecessary. If people want to transform their logs into a different storage format, that is up to them. Text files, however, are a fantastically simple way of storing... (drumroll please) text. Surprising /s
4ydx··on Grepping logs is still terrible
http://www.internetlivestats.com/total-number-of-websites/

If I read it correctly there are about 250 million active sites (roughly). It seems unlikely that they are all massive corporate sites.

As an aside, the idea that systemd is a good thing is hilarious to me at the least because it is so brash about making an important change to a huge chunk of the system. Yes the bugs will eventually get ironed out, but in the meantime? Count me out! I have work to do and am not interested in being a free tester for Redhat on my live systems.

4ydx··on Some Practical Thoughts on Suicide
Objectively "BS"? What does that even mean? You need to get a grip and stop your anger towards people who are feeling terrible. If you don't recognize the kind of imagery (the manly-man imagery) that is typically associated with your choice of words, please take a moment to reflect on it. You cannot say "I empathize with you. By the way your reasons for feeling this way are total BS" in the same breath and have any semblance of actual empathy. You feel yourself a clever wordsmith, I'm afraid, who packs a gun called "tough love".
4ydx··on Wearing a Suit Makes People Think Differently
Is anybody really surprised by this research? I doubt it. Humans love to form exclusive groups. A suit is nearly non-functional and mostly symbolic: I have a job where I am "important" (and I make money). A uniform on a police officer or a doctor or a firefighter? It helps people to distinguish them from the rest of the crowd. A suit on the other hand is a generic line drawn in the sand between people, I feel.
4ydx··on A Rust Contributor Tries Their Hand at Go
Glad you pointed this out. Hopefully the original author will make a note of that on his blog because when people run across it they will be given the wrong impression about how this would be handled in Go.

I love how "opinionated" and slim Go's design is. The less variation in code, the better, in my opinion. It might not be as "fun", but frankly I have a lot more fun programming when I don't have to deal with esoteric solutions to problems.

4ydx··on A minimal blog engine written in Go, compatible with Ghost themes
Honestly I wish that golang forced you to acknowledge all return values from methods even if you simply ignore them ( _ = Method() ). When I read the docs for any method calls in golang I like being able to see that something returns an error just by looking at the function signature. Certainly I might not know how to handle all the error variations, but not having to decide if I need to wrap something in try/catch... I dunno it just resonates with me.
4ydx··on A minimal blog engine written in Go, compatible with Ghost themes
This is a simple way of dealing with repetitive error handling.
4ydx··on A minimal blog engine written in Go, compatible with Ghost themes
https://gist.github.com/4ydx/70b732c15d83c294c7dd
4ydx··on Ask HN: Do I give up now?
"Hard work" is relative. As a baseline, if you are able to feed, cloth, and shelter yourself, you are doing just fine. If indeed you have actually been working that much every day then perhaps you need to take some time off and relax.
4ydx··on Becoming Productive in Haskell
I would assume that anything that has an underlying pattern would be describable with Haskell. It is a functional programming language after all. If you are not very mathematically savvy, it might not be for you.
4ydx··on Four days of Go
And how often do we actually encounter these "unknown" json data types? Using an official api? Never.
4ydx··on Go Challenge 3: write a photo-mosaic generating web application
I am probably missing something, but I would think that treating each sub-image as its own grid would be more than enough for a decent mosaic generator. It seems to me you would get your edge detection for free this way. I just don't think it would be hard, but, again, I haven't done it myself so I'm sure there are surprises within.
4ydx··on Go Challenge 3: write a photo-mosaic generating web application
Granted I haven't written my own mosaic generator, but it seems little more than iteration and averages.
4ydx··on Go Challenge 3: write a photo-mosaic generating web application
Two of the three examples seem to use ghosting. I wonder how much those sites make?
4ydx··on How ZenPayroll processes billions of dollars in annual payroll
Amazing that you can do this with confidence. It seems like a huge amount of work though. When it comes to money, I would think that compile time guarantees would be advisable :)
4ydx··on Ways Men in Tech Are Unintentionally Sexist (2014)
There is such a thing as being overly sensitive. And yes in my mind they are in fact overreacting because I know what my intent was.
4ydx··on Ask HN: Should I learn Scala or Go?
Agreed: 1) SQL is not solved in an ORM sense. Yes you will have to write sql statements. I'm not so sure this is a bad thing.

Beg-to-differ: 1) Templating works very well for me. You can pass variables to embedded template "partials" within a template. You can define your own functions for the templating engine to use etc. 2) net/http + gorilla (or something similar) and you have all of net/http exposed with some sugar on top. 3) csrf tokens are just a simple library. Yes you do have to be sure to put them into your templates.

If you are having difficulty with a middle-ware concept in terms of golang there are plenty of resources online.

So I would say that I have a different feeling about making websites in golang :) I enjoy it.

4ydx··on Remote Kernel Code Execution Via HTTP Request In IIS On Windows
I agree that systemd is a bad idea in the sense that they are doing too much all at once. It is a fine level of arrogance to assume that there wont be problems along the way :P That being said this thread is about the poor souls who are running IIS servers.
4ydx··on Ways Men in Tech Are Unintentionally Sexist (2014)
If I say that an inanimate object is "sexy" and the woman nearby me feels offended by it, certainly I don't want her to feel bad, but I have to be entirely honest and feel entirely blindsided by her state of mind. If I talk about night being dangerous because it is dark and visibility is low and a dark skinned person nearby gets offended, I really have to wonder. I mean as a white guy I guess I have to assume that everybody around me is assuming the worst of me? You don't have to answer that. And I would hope that the person who feels offended would try to meet me in the middle, as it were, by evaluating their overreaction to the situation while I would try to evaluate the language I use, but seriously we are really going down a rabbit hole here.
4ydx··on Ways Men in Tech Are Unintentionally Sexist (2014)
I just realized that my wording was pretty vague. I would err on the side of not changing your attitude. I say this primarily because using one persons reaction (or even a few peoples reactions) to something you do as a test for deciding if you should reevaluate yourself would make you chase your tail like a dog: there would be no end to it. But yeah it is mostly about intent, in my mind. Disagreement is necessary but not sufficient for change.
4ydx··on Ways Men in Tech Are Unintentionally Sexist (2014)
If you explain your intent and they still feel offended, I do wonder how one should react to that. It feels to me like someone who is being pedantic who thinks they are "right". Who knows, maybe it does offend enough people that this usage will decline.
← PreviousPage 2 of 5Next →