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

Before modifying an existing line of code, understand what it's purpose is/was. Even if it doesn't appear to have one, or make any sense, someone created it for a reason.

Also IDE/search tools for determining where a function is used are great for removing stale, unused cruft.


Off-topic but can you recommend any resources off-hand for improving in your preferred C++? I share your approach but have a heck of a time finding quality books and such. (Email in profile if preferred.)


I enjoy Yossi Kreinin's blog [1] and The Old New Thing [2]. I don't read programming language books, which I usually find to have little good industry knowledge and to be too detail oriented and easily out of date. Although K&R (the one about C) is a great book that's exactly the right size and the examples from the Gang of Four book are actually very on point.

Most often I learn code by reading code. OpenSceneGraph is an example of an open source project that has modern ish C++ but no deliberately abstract misdirection. Open source usually does not have super clean code but it's a good way to sample the variety of structures you can find in a project. Of course the classics (sqlite and the Linux kernel) are much too C-like for where I'm getting at but they are still full of lessons for how to organize modules and APIs, how many arguments to pass and where, where to park I/O code, that sort of thing.

I posted it here for the benefit of HN readers who may have the same question but I'll write you an email too so you can share what you want to improve and such. There aren't many C++ programmers left in the HN-reading, not just punching a clock demographic, and I kind of miss talking to people who get that. Like the prototypical game dev in the article I go to one conference a year, and it's not about C++.

[1]: https://yosefk.com/blog/ [2]: https://blogs.msdn.microsoft.com/oldnewthing/


I'm sorry you're going through this, but I think it's prudent to consider the converse of the situation you're desiring. What if CrowsourcedCriminalMugs.com did exist, and your face was erroneously added to it? Isn't this whole idea just a form of high-tech mob justice?


This is basically the point of the police, imagine this crowdsourcing thing did exist, but instead of everyone being able to see it only a select number of people who had been trained how to capture people and bring them to the courts without harming them could see it and respond. And they got paid to do this by everyone in the local area paying some money for them to do it. That’s what the police should be.


That's not the police, that's a paid private militia to round up people you "identify", with no accountability. Do you not see how that can go wrong?


The “people in the local area paying money” is tax. And from what I hear of US police, there doesn’t seem to be much accountability, certainly nothing like in the UK.


You pay a fee to have it removed, of course (sites like this already exist). What could possibly go wrong.


> The single most crucial aspect of the Green New Deal is its proposed job guarantee, a controversial policy that says that every American can have a job with the government if they want one. Data for Progress, a leftist advocacy group, claims that the Green New Deal could generate 10 million new jobs across the country over 10 years.

Let's deal with Climate Change by implementing socialism. Yes, I'm sure that will work. Reminds me of the regexp joke. Have a problem? Use a regexp! Now two problems.


We already have socialism, we are just in denial. Social security, taxes to cover job losses. We have a crappy socialism that doesn't protect people well, but that's what we are.


The "capitalism" approach - cap-and-trade - didn't work because Republicans on Congress successfully opposed it and some people were concerned about economic impact. So the end result is that now people are pushing for something that prioritizes "jobs."

And now people like you are opposed because it's socialism. The truth is that some people will ALWAYS oppose anything that hurts the fossil fuel industry and will find excuses to oppose it no matter what.


U.S. emissions have declined three years in a row. (Sounds like the capitalist approach might be working?) But by all means, instead of going after countries whose emissions are actually increasing, let's instead implement one of the most murderous political philosophies of all time. If these politicians were serious about addressing the issue, they wouldn't tie it to such a controversial measure.


This issue is urgent and no, we aren't doing enough here to avert disaster. And we need to do more at home WHILE we do more abroad -- we cannot use that as an excuse for inaction.

https://www.cnn.com/2018/11/23/health/climate-change-report-...

https://www.nytimes.com/2018/10/07/climate/ipcc-climate-repo...


I think a huge component of this is the ever-present stigma of mental health and counseling. People who are incredibly stressed and suffering mentally and physically should be able to visit a therapist as easily as they can a doctor. When they don't, or feel like they can't, they lose the chance to learn helpful coping mechanisms and life strategies which can have a drastic impact.


So the government should routinely measure hormone levels of almost everyone, and levy fines against employers which will inevitably be passed on to employees or consumers. No thanks.


I think that the risk to one’s privacy is too great. I don’t want the government or my employer to collect biometrics on me.


Per my comment above, we actually just experienced the largest 2-year drop in temp in the last 100 years. The danger with a hugely complex system like "global warming" (i.e. world climate) is that it can be attributed to be the cause of anything.


Here's what seems to be a chart of the last hundred and thirty-six years of global land-ocean temperature.

https://climate.nasa.gov/vital-signs/global-temperature/

It seems some years are cooler than others, but the general trend is upwards.

I don't see where the last two years indicate much of a temperature drop. Do you have a source of information for your statement?


NASA GISS surface temp data [0]. Feb 2016 to Feb 2018. It's a noteworthy occurrence (and not something the news cycle would pick up) since the focus is always on warming. It certainly doesn't refute the short-term trends present.

https://data.giss.nasa.gov/gistemp/


Cherry picking 2 data points is not the right way to interpret a trend. 2016 was a spike, but if you look at the trend over the past 20 years (in the data set you linked) it is clear temperature is trending upwards at an accelerating pace.


You're burying the lede here.

While 2017 was slightly cooler than the year preceding, it was the second hottest year since global temperature records began in 1880.

From the same page you linked. https://www.giss.nasa.gov/research/news/20180118/

We'll see how 2018 compares. Look at the chart and you can see that it's not a straight line, it has ups and downs. I see no reason at all to assume that it's trending downward for the next few decades to erase the increase seen over the last century.


Since everyone is arguing their beliefs without evidence, and throwing out random storms and climate events as counter-evidence, here are some actual facts:

1. Recent studies on current climate models show they consistently over-predict carbon impact on global warming (source: Nature, Nov 2017: Emission budgets and pathways consistent with limiting warming to 1.5 °C). The article shows that the previous carbon budget was off by a factor of 4 for the next few years, and always predicted higher temps. In other words, the models over-fit the data and thus lose predictive capabilities.

2. Increase/decrease in drought occurrence is inconclusive (Trenberth et al in Nature, 2013): "Two recent papers looked at the question of whether large-scale drought has been increasing under climate change. A study in Nature by Sheffield et al entitled ‘Little change in global drought over the past 60 years’ was published at almost the same time that ‘Increasing drought under global warming in observations and models’ by Dai appeared in Nature Climate Change (published online in August 2012)."

3. On storms, SREX p. 159: The present assessment regarding observed trends in tropical cyclone activity is essentially identical to the WMO assessment (Knutson et al., 2010): there is low confidence that any observed long-term (i.e., 40 years or more) increases in tropical cyclone activity are robust, after accounting for past changes in observing capabilities.

4. The greatest two-year cooling event of the last 100 years just occurred in Feb, per GISTEMP Team, 2018: GISS Surface Temperature Analysis data. Global avg temp dropped 0.56 deg C.


This is not a difficult experiment. If you keep a weapon, you should familiarize yourself with the relevant local laws. RTFM, as they say. If someone makes a threat against you that is not immediate, you should contact the police. Yes, you would be put on trial for deliberately going outside and shooting someone not on your property. Duh.


Yeah I tend to agree with you on this thought experiment, a more appropriate response obviously - but if you take away the faulty variables like that and the call does in fact require you to defend yourself in the manner described, then yes, it it was a hoax then the caller should be responsible (if they figure out who obviously).


I think the key is what happens when they're ready for interaction. When she's done brushing or using the bathroom, do you put the phone down right away, or finish reading/playing? Similarly, if you're focusing on something else instead of playing the (boring) game, your kid will know it. Kids are very good at recognizing when mom and dad aren't paying attention. They'll learn your "attention hierarchy". Do it enough and they'll learn that phone > my game/idea/talk. Definitely a balancing act.

We've found it useful to just be honest with them. "Dad needs 5 or 10 minutes of Dad time, then we'll play."


Agreed. No one should be expected to just sit and watch each of those long dumps splash into the toilet bowel however when I take my kids to the park playground and play with them there I see many parents never supervising and just staring into their phones even when the kid is calling out to them. Like most things the right balance is needed.


It easy to judge when you don’t know what else is going on in people’s lives... some parents are the sole carers of their kids and spend 16 hours a day looking after them. The park may be the only time in the day they get some downtime when the kids are occupied running around


Yes totally. I go on my phone too sometimes when they play but try to make it a point to look up and check periodically to ensure either they're not in trouble or irritating someone else. The problem is these things can happen in an instance. They are definitely exhausting and getting the balance right is hard. I was talking more about someone who's disappeared for a half hour sitting faraway or there is a kid going crazy (had one attacking others with a stick) and none of us even know where/who the parent is. That sounds more like the sort of thing the article is talking about, if your kid is wishing the phone wasn't invented you're probably on it too long.


I think this is the right answer. You need to steal some you time while you can but still be attentive when you need to be. I imagine the kid that wrote the letter in the article is used to being wholeheartedly ignored while Mum checks Facebook. If you go to cafes you can watch this phenomenon unfold right in front of you: inattentive parents on their phones whilst their kids vie unsuccessfully for a little bit of connection with their favourite people in the world.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: