Dirty COW and why lying is bad even if you are the Linux kernel
1 0 comments 26 May 2017 05:50 u/mortoray (..) in v/programmingComment on: Only 36% of Indian engineers can write compilable code: study
0 15 May 2017 06:53 u/mortoray in v/programmingThe bitwise complement, or not operator, is unsafe
1 0 comments 03 Mar 2017 06:04 u/mortoray (..) in v/programmingStuffing curves into boxes: calculating the bounds
1 0 comments 23 Feb 2017 07:03 u/mortoray (..) in v/programmingWhat is the length of a string? A tricky question
2 1 comment 27 Apr 2016 19:44 u/mortoray (..) in v/programmingEfficient open ended queues with deferred deletion
0 0 comments 07 Mar 2016 11:35 u/mortoray (..) in v/programmingComment on: Everything can and will go wrong: all functions fail
It's not functions that eventually work that are causing software to crash, security breaches, and other data corruption.
The article is meant to serve as an anchor, and reference, for other discussion about error handling. Given that errors can happen all the time a language, and libraries, should be designed so that programmers don't need to think about errors all the time.
Comment on: Everything can and will go wrong: all functions fail
Sorry about that, I do try to pay attention to these things. I fixed it and hope you will continue reading now.
Everything can and will go wrong: all functions fail
2 5 comments 06 Nov 2015 08:30 u/mortoray (..) in v/programmingMessy error handling in Rust with `try!`
13 1 comment 28 Oct 2015 15:30 u/mortoray (..) in v/programmingReusing existing test suites for new features
1 0 comments 10 Aug 2015 08:23 u/mortoray (..) in v/programmingComment on: Calculating square root using Newton's iterative method
Yes. I'm trying to create a language that is very modern and without suffering from backwards compatibility overload.
Comment on: Calculating square root using Newton's iterative method
I know it isn't always interesting to all people, but I try to give a bit of background to such things before jumping into my actual code. A lot of people are not likely familiar with Newton's method, or this type of iterative processing at all.
Yes, I'm happy with how I got the initial guess. I was reading up on how to do that step and didn't see that approach (I'm sure it must be known, given it's obviousness, just that I didn't read enough). Given that the numbers are stored in base 2, with a normalized significand, this initial guess is amazingly close to the correct value allowing a very low number of iterations.
Comment on: Calculating square root using Newton's iterative method
It's all of course tentative syntax at the moment. I thik most of what is there will be similar in the end, but I'm leaving it open to change whatever I want. :)
Calculating square root using Newton's iterative method
14 8 comments 29 Jul 2015 06:38 u/mortoray (..) in v/programmingEssential facts about floating point calculations
11 1 comment 06 Jul 2015 06:44 u/mortoray (..) in v/programmingComment on: Antialiasing with a signed distance field
Signed distances fields are used pretty much this way to render text nicely in a 3D environment. You produce a font atlas by rendering fonts at a very high resolution, then producing a reduced distance field version. This basically looks like a gradient by the edges of all the text. You then use this to draw the text, not directly, but to calculate the distance. Then you can use the same technique from my article to draw either exact on/off borders or antialiased borders (likely more desired for text).
The trick is that even through bileaner filtering each pixel gets a single distance to the edge, and this distance is quite accurate for the pixel on the screen. Obvioulsy it has its limits, but it does a really good job of producing readable text with a fixed texture atlas.
There's quite a bit about this use of signed distance fields available online.
Antialiasing with a signed distance field
14 2 comments 19 Jun 2015 05:20 u/mortoray (..) in v/programmingComment on: Nobody cares about your code
It may differ from team to team, but several I've worked on even the programmers did not much care about the code. We were invested heavily in process, like unit testing and use driven development. A primary motivator was showing that the features were actually working. The actual code was kind of secondary, so long as it was working we were okay with it. It's actually kind of liberating for programmers knowing that nobody really needs to care about your code -- I don't want somebody micromanaging details and nitpicking small choices.
I'm going to put a big "however" on this, and it's something I mention in the article as well, I'm assuming a certain base-line of competant coding and workmanship. Crap code is unnaceptable everywhere; it's also very unlikely to actually implement the desired feature. The article is a counter to over-engineered results and needless perfectionism. It's about finding a good balance and focusing on the priorities of the project as a whole.
I find these results very questionable. They're based on an automated assessment tool http://www.aspiringminds.com/technology/automata There are only sparse details on how that works. They also appear to be basing it on "known" good coding techniques, without any listings, and despite the rest of us always arguing about what is good and bad.
While the situation may not be good, this study is completely untrustworthy. It's just a company trying to sell their questionable HR product.