HNHacker News
TopNewBestAskShowJobs

oolongCat

214 karma · joined January 20, 2016

submissionscomments
oolongCat··on Go stack traces and the errors package
oops. My Bad

the code above should be

  type AppError struct { 
    Code int 
    Message string 
    InternalMessage string 
    Time time.Time 
    HttpCode int 
  }
oolongCat··on Go stack traces and the errors package
Hah, this is very similar to the one I use within my apps.

type AppError struct { Code int Message string InternalMessage string Time time.Time HttpCode int }

All my errors are handled in a http handler function. Before that these errors are produced in any functions called by my handler functions.

I concatenate in to the InternalMessage var any error message I want to log, basically anything I want to show an admin. The message tag will have anything I want to show a user. Normally separated by a semicolon.

Because of this I can give good errors to my users, and I have enough information when something goes wrong.

The only negative might be that, the internal error logs are a bit verbose.

oolongCat··on University pays $20,000 to ransomware hackers
Actually I am implying it is possible for some types of ransomware. Here's an example.

https://github.com/leo-stone/hack-petya

(the hn thread https://news.ycombinator.com/item?id=11474613 )

oolongCat··on University pays $20,000 to ransomware hackers
Ranked 151-200 in the QS rankings for CS. I bet if they handed this problem over to the CS people in the university they would have willingly helped them out to fix it.

Information security is even listed as one of their main research areas.

http://www.cpsc.ucalgary.ca/cpsc_research

they even have some labs that does infosec

http://icis.cpsc.ucalgary.ca/ http://ispia.cpsc.ucalgary.ca/

I bet the people at the CS dept must be pissed.

oolongCat··on Police use new device to seize money in bank accounts or on prepaid cards
I come from an Asian country, we are used to bribes, crooked politicians, government workers etc etc.

To me the USA was the place where Neil Armstrong lived, it was the country that gave me so much that I was thankful for, it was a country where the words "Freedom of speech" ruled above everything. To me it was the country I wanted to be in if I had a wish.

Little by little, that idea I had of the united states is being changed, may be its my fault since I idealised the USA too much. May be its the news I read about, large scale surveillance, government officials who has no regard for civil liberties, people more powerful than the FBI, people above the law, power crazed security guards at airports etc etc.

I really really dislike this, wish I would once again get to believe that there is a place where people are treated right.

oolongCat··on Firefox 48 Beta, Release, and E10S
Jesus! you are right, I am honestly confused now. I always thought ff used more space than chrome.

Even now looking at the two makes me feel as if ff is some how bulkier, I am looking at the same page, and ff look really huge EVEN IF ITS NOT!!...

That's really odd.

oolongCat··on Firefox 48 Beta, Release, and E10S
>screen real estate

That's one of my biggest complains about ff, using chrome somehow feels clean because of this.

oolongCat··on A Facebook Sixth Sense
Well, if they introduced some "special feature" that's available only when you install a certain plugin, I am sure millions of people will do it just because they can get the "special feature."
oolongCat··on I created Godwin's Law in 1990 as a warning
And this is why I have to use ad-blockers.
oolongCat··on Reddit launches image uploads, ditching alliance with Imgur
What are some better alternatives to s3?
oolongCat··on Fire-damaged Brazilian tortoise receives new 3D shell
Aww they missed an opportunity to print a red shell, or a blue one. Wonder how an animal like a tortoise living with others would react to if it had a different colour shell.
oolongCat··on Google moves to replace Flash with HTML5
You seem to live in the bubble where everything in the world is written using the latest technology at your disposal.

The sad reality is, there are are many companies that depend on flash for their corporate software. We all hear horror stories where IE6 has to be supported.

While I whole heartedly agree flash is something I would avoid like the plague it is not the reality for many companies. Think about it, at one point we all though flash was the cool new thing, but now almost everyone we know hates it. But if you force thousands of companies to replace their software just becuase another company does not want to support an ancient technology, it should ring alarm bells for us all. It would cost billions of dollars in upgrades if we consider all the companies that would be effected.

Google has to be put on the spotlight when they make changes such as these that would effect many people they have to give a good reason other-than, "oh its old, has many security bugs."

Google has to stop forcing everyone to conform to what they think is a best practice. They need to go through the proper channels, they need to get people like the etf, w3c and take these actions in a democratic way.

Google is slowly moving away from what made many of us love them, "Don't be evil" google was our hero in a time we had to put up with companies like Microsoft. It makes me incredibly mad to see a company I loved turn in to the companies they replaced.

oolongCat··on Google moves to replace Flash with HTML5
Flash is garbage, yes! I agree, I am talking about these blocking changes as a whole.

Flash while it is indeed a piece of garbage, has done a lot for the internet, there are many places of the internet that are flash dependent.

Some companies are still using flash in their internal systems, how do you justify breaking something that works for so many people?

oolongCat··on Google moves to replace Flash with HTML5
<rant>

Getting really frustrated with all the things chrome is starting to change.

We are starting to become a bunch of sheep, if google wants something, they announce it, and implement it, we developers, users have to fall in line and start doing everything they want.

What the hell is going on, why are we not pissed off about this. Look I hate Flash as much as the other guy, but blocking an extention just because a company doesn't like it. How long before we see adblockers, anti piracy trackers and basically anything that a company like google will see as a threat get blocked.

Don't give me that "Oh flash has security holes so we are blocking it." Yeh when our governments use this same excuse we are all up in arms, but when a company does this many are okay with it.

The sad sad truth is majority of users are going to fall in line whenever a company decides what's best for them.

</rant>

And to all the fan-boys/girls down-voting me. Have the decency to leave a comment as to why you are downvoting.

oolongCat··on Lambda expression comparison between C++11, C++14 and C++17
A question people who use C++ regularly, is C++ becoming easier to read and code?
oolongCat··on How to Center in CSS
Open the console window on chrome, it displays why it wont generate the code.

In my case, I didn't specify a value for H and V ALIGNMENT and I got "bundle.min.js:3 Uncaught Invariant Violation: No horizontal alignment"

Love this website nevertheless.

oolongCat··on Ask HN: Why do programmers suck at estimating hours?
My biggest enemy against estimates is debugging, it is really easy to forget how simple bugs in a program can be the biggest time sinks.

--edit--

I guess this is something good programmers excel at doing, plus every-time get stuck with a time wasting bug, reminds me I have so much more to learn.

oolongCat··on The Website Obesity Crisis (2015)
See the main problem then, is not a problem with if websites are obese or paper thin, the question is are websites and our browsers doing a good job of using already existing features for helping users.

I think we should be complaining about developers and admins who doesn't enable gzipping, we should be angry with the fact some websites don't even bother setting headers to cache static resources. We should not be throwing out hands up in air screaming crisis because our web is becoming more useful.

oolongCat··on The Website Obesity Crisis (2015)
Calling this a "Crisis" is definitely blowing this out of proportion. True, websites have grown by a lot over the past decade, and so has functionality, take a look at your favourite websites on the waybackmachine and see how god awful most of them looked just 6-7 years ago, compare the functionality they provided vs what we have now.

Yes I agree some websites do really need to go on a diet, loading unused css, js and multimedia has to be removed, but 1-2MB is not a reason anyone should be throwing their hands in air screaming CRISIS!! Definitely I would applaud anyone who would spend their time optimising their websites to be as small as they can be, but Jesus Christ 2BM and we have a crisis... no way!

I for one think this is a sign we are making progress a very good thing, we are improving as a community and we are getting more out of our web.

oolongCat··on If You Think Free Money Kills Work Ethic, Your Definition of “Work” Is Horrible
You are right, I have made a mistake on my part.

But I still think when it comes to this article this should not be up-voted to the front, the main argument in this article is just fundamentally wrong. I feel the author is in a bubble and has no idea what so many people around the world have to go through, and that not everyone is lucky enough to work on things they love.

oolongCat··on If You Think Free Money Kills Work Ethic, Your Definition of “Work” Is Horrible
tldr of this article to me screams, "If you don't hold the same opinion about this as me, you are horrible."

If you think someone who works for the sake of money is a "horrible" person, you have to step outside your bubble for a tiny bit and look at the world, you will notice so many important jobs in society no one would really want to do unless money was an intensive.

Don't get me wrong, I am one of those people who are lucky enough to work in an industry I am honestly excited to work in. But you can't say the same about many jobs, doubt you can find a janitor who loves cleaning piss and vomit, its an absolutely important job in our society, the only reason I could think of why someone would do it is because of their situation in life and how the money earned from it can give them a partial answer to their problems.

Seriously HN what hell are you guys up-voting to the front page these days.

oolongCat··on Angular 2 Release Candidate
Ask HN: Why would I spend time upgrading my Angular1 code to Angular2 when I can migrate to React Or Vue.js.

I am honestly intrigued as to what Angular2 offers, that other JS frameworks wont?

oolongCat··on End of Golden Era for Investors Spells Troubles
While I get the sarcasm in your comment, if you really are serious about you not saving, then this means you need to be even more scared about what would happen to people with no savings, in a situation as described in the article.
oolongCat··on Most popular links in Hacker News comments, 2006–2015
For some odd reason if anyone is missing the hostility, there's always IRC, one of the best places to learn but also one of the best places to get flamed.
oolongCat··on The Science of Making Friends
This is incredible, thanks very much for sharing this. I really needed this.
oolongCat··on The Science of Making Friends
>A study published in February in the British Journal of Psychology looked at 15,000 respondents and found that people who had more social interactions with close friends reported being happier—unless they were highly intelligent. People with higher I.Q.s were less content when they spent more time with friends. Psychologists theorize that these folks keep themselves intellectually stimulated without a lot of social interaction, and often have a long-term goal they are pursuing.

Does anyone have a link to this so called study? Funny how in academia you are required to reference everything but when it comes to journalism anything goes.

---edit----

Please ignore my request, I had a temporary brain fart, a Google search helped me find it.

http://www.ncbi.nlm.nih.gov/pubmed/26847844

oolongCat··on Ask HN: How much free time do you get per day?
Like it or not you are going to have to sleep.
oolongCat··on Glot.io: Open Source pastebin with runnable snippets and API
It's opensource. https://github.com/prasmussen/glot
oolongCat··on Three teen sisters who win medals in coding competitions
I think most of the negative comments are here, because of the sexist tone of the author of this article. What these girls have archived is something we should celebrate, not as a victory for the sexes, but as a sign that more and more young people are learning to code.
oolongCat··on Three teen sisters who win medals in coding competitions
Its the year 2016 and the author of this article is still under the assumption that sex has something to do with skill gained through persistence.

--edit-- My congrats to the girls, its really amazing, I could only imagine the amount of work they put in to achieving everything.

← PreviousPage 3 of 4Next →