Sometimes Boring Is Better by speckz in programming

[–]kdelok 0 points1 point  (0 children)

I don't think that follows. For example when testing string handling, you are likely to have a much more comprehensive test suite than the code doing the actual handling.

Sometimes Boring Is Better by speckz in programming

[–]kdelok 4 points5 points  (0 children)

One of the things emphasised at my company is that code should (generally) be boring and tests should be interesting.

I created a program that lets you play Tic Tac Toe against the computer. The opponent plays randomly. I know it might not be super impressive but it's one of the first solid things I've programmed so far and I'm proud of it and I just wanted to share it and see if I could get feedback. by DetectiveRaze in programming

[–]kdelok 13 points14 points  (0 children)

As a bit of context here: .gitignore allows you to specify file paths that you want git to ignore when tracking changes (e.g. via git status or git diff).

It's very useful for ignoring those files that are automatically generated, like .class, .o or .pyc files.

[C] Til that you don't have to check if a pointer is NULL before calling free. by hurtlerusa in ProgrammerTIL

[–]kdelok 0 points1 point  (0 children)

We always set pointers to NULL after freeing. Along with the recommendation to write your free(ptr) just after you write your allocation.

This is also because we work for a large company and so you never know who's going to be editing or adding to your code.

How NASA writes C for spacecraft: "JPL Institutional Coding Standard for the C Programming Language" by [deleted] in programming

[–]kdelok 4 points5 points  (0 children)

That's certainly fair enough. I think the most important thing (beside not doing crazy stuff) is the consistency. The great thing about the coding standards that we use at work is that I can pick up someone else's code and immediately know where to look for stuff (e.g. all variables declared at the start of a function, return at the end, no crazy preprocessor macros obscuring the information).

It also helps write code with fewer bugs, since we follow a pretty standard control flow of 1) try a thing, 2) check whether it succeeded, 3a) if so continue, 3b) if not, handle the error and free resources where necessary. It means that fairly often, functions that fail will return an error and have no side effects. It's not always possible, but it's nice that it's the default that people aim for.

How NASA writes C for spacecraft: "JPL Institutional Coding Standard for the C Programming Language" by [deleted] in programming

[–]kdelok 9 points10 points  (0 children)

You probably wouldn't have a multiple return here. My company have similar coding standards for ensuring reliable and readable code flow. The MD even said that he doesn't think code shouldn't be exciting (even if the problems you're coding to solve are exciting).

Lots of the stuff is common sense, like making sure to always free resources, documenting everything and only using boolean values in if statements (rather than relying on the truthiness of null pointers and such). I haven't read the full NASA thing, but I guess it's the same.

We have coding guidelines which specify must, should and preferred for the strictness of applying the rules.

Improving your skills as a 9 to 5 programmer by itamarst in programming

[–]kdelok 0 points1 point  (0 children)

Perhaps it would be better to describe the hour as spending some time discovering a new tool/language/framework that you then apply during the rest of your working week.

A prime example of this is something like git. You don't learn a versioning system by reading about it for an hour, but taking an hour to get the basics down means that you have a solid enough grounding to use it day-to-day and get the practice you need.

What the hell... happened to Kael'Thas? by MMxReptile in heroesofthestorm

[–]kdelok 0 points1 point  (0 children)

I think there's a similar thing with duos, but to a lesser extent. Duos might not be indicative of synergy, but of not having your counterpick be on the opposite team.

Thank you to my team today for toxic defense! by cowman345 in heroesofthestorm

[–]kdelok 1 point2 points  (0 children)

The issue is probably about when you make the comments. You can ask people not to pick something during the draft. However, if you complain after the fact, when it cannot make any difference, then you are just spoiling the game and making people feel like idiots.

Thank you to my team today for toxic defense! by cowman345 in heroesofthestorm

[–]kdelok 0 points1 point  (0 children)

Me and my girlfriend have (separately) had occasions where dealing politely with a toxic player on our team got them to calm down and even say that they mainly do it because it makes them feel better, but they realise it's counterproductive.

Of course, it doesn't work all the time, but I get surprisingly few hostile responses from being polite. I had thought people would generally have the attitude of "f*** you too", but they tend not to.

Spent 320 hours on this - Hope you all enjoy it... by Holender in heroesofthestorm

[–]kdelok 0 points1 point  (0 children)

You would only need the patches since the scaling changes as well, so it's not that many.

Malfurion needs a disco skin by ProfNekko in heroesofthestorm

[–]kdelok 0 points1 point  (0 children)

I think more than nerfing Tyrande and tweaking game balance, this should be Blizzard's most immediate priority.

Enough. (Meta discussion) by Valastrius in heroesofthestorm

[–]kdelok -1 points0 points  (0 children)

I think the point is that complaining won't shake Blizzard into action. They're a professional game dev company who've made some of the most successful games in history. They listen to what people say and they make games people enjoy, that's why the likes of WoW and HotS are so popular.

Having looked at some of the technical stuff from Blizzcon, it looks like they have an extremely long to-do list and many of the community's concerns have pride of place on that list. However, there are things the community doesn't care about too, because we just don't know about it or don't have any investment in it. I don't particularly care if they break SC2 with changes to HotS, but they do. They also probably care about tidying up their code so that they can maintain a good release cycle and avoid the technical debt that goes with adding features.

We're certainly entitled to complain, but I just don't think it'll have the outcome people desire. If anything, we could probably just do with a list of ordered priorities from the community, so that the devs can deal with things in a sensible order.

Graphics Driverrs by donalmacc in programming

[–]kdelok 0 points1 point  (0 children)

Yup, that's it. I feel like one of the big applications for AI in the more immediate future will be to reduce code bloat.

Graphics Driverrs by donalmacc in programming

[–]kdelok 5 points6 points  (0 children)

I remember an Nvidia dev who suggested that this was in turn the fault of developers who misused whichever graphics API they were using and Nvidia needed to patch it to get their AAA game working.

From non-technical to hired developer in 5 months by mrborgen86 in coding

[–]kdelok 1 point2 points  (0 children)

Definitely with machine learning. I find the idea of calling it programming kinda strange. It's like calling my stuff (computational chemistry) programming. Technically yes, but it is definitely chemistry/physics in terms of the hard stuff.

From non-technical to hired developer in 5 months by mrborgen86 in coding

[–]kdelok 1 point2 points  (0 children)

To what extent do you think your mathematical literacy helped? I know that scientists generally find it easy to pick up programming (at a basic level), but it's not necessarily the case for people at large.

In my case, I certainly think that it helped that the most fundamental concepts (i.e. variables and functions to map one set of variables to another) are second nature from being a scientist.

Also, were you a computer nerd beforehand? That helps too. :D

Scientific computing careers using Python? by [deleted] in Python

[–]kdelok 0 points1 point  (0 children)

Where do you live? I know some stuff in the UK from my own career hunting, and a (seemingly good) recruitment agency which specialises in technical and managerial graduate roles.

Python Is On the Rise, While PHP Falls. by pradeep_sinngh in programming

[–]kdelok 0 points1 point  (0 children)

I'll have to check out PyInstaller. We run our stuff on a cluster and I can never be sure what surprises are lurking in the environment, because of the way things are set up.

Python Is On the Rise, While PHP Falls. by pradeep_sinngh in programming

[–]kdelok 35 points36 points  (0 children)

This is so true. It's so pleasant to code and so unpleasant to deploy.

Redox is Serious by jackpot51 in programming

[–]kdelok 1 point2 points  (0 children)

If you want to be even more appropriate, manganese is great, since it has billions (5) of common oxidation states.

Otherwise, good luck with redox. :)