View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Often times I’m finding that for many of my software projects, I have a clear need to have an organized system for the simple case where you want code to be shared across projects principally, almost exactly, by copying and pasting code.

Okay, the right way to work with such modular code bases.

  1. Create a “mother” code base.

  2. The primary “build system” in the mother code base is to generate a vendorable subset using a configure system. Or, in the case of extreme simplicity, just by named scripts to copy a select configuration.

  3. Once a configuration is chosen, a destination directory structure is generated using the selected subset to be vendored.

  4. This code can now be copied and pasted into the master project and worked into the master project’s build system.

When using GitHub, this can all be implemented as a modified theme of the GitHub Pages publishing method. A CI/CD system automatically generates all of the required vendorable configurations upon code change, and these can be included in projects using them using Git submodules.

Read on →

lib2geom, ah yes, the graphics math library that has been in Inkscape for many years designed to be reusable outside of Inkscape. But, really, I have to wonder? Has it actually ever found success outside of Inkscape? All the related software I ever heard of in the intervening years always used their own library, again duplicating on the trend of app developers making a library of potentially sharable subroutines that never get shared and reused in practice.

Well, that’s far from the full story. Actually, Inkscape’s lib2geom library was actually only ever fully available for an independent public release two years ago. So, that’s the big reason why none of the other projects you’ve heard of ever used Inkscape’s library, it simply wasn’t mature enough and ready yet. Second, about your naysaying and criticism that the shared library will never get reused, in fact many game developers and graphics programmers have been inquiring over the years about the possibility of reusing Inkscape’s graphics math code in their own software. Also, the library wasn’t just created by Inkscape devs, but it was a partnership with the Monash University researchers hoping to get more widespread use of the result of their research, so they too were eager to not just make their results available in Inkscape, but also as a separate library. So, let that be said, the effort to make it a separate library was prudent and well-guided.

20200514/DuckDuckGo lib2geom
20200514/https://inkscape.org/news/2018/11/11/graphics-math-library-2geoms-first-release-availab/

Read on →

Here is another store that has many old computers stocked in it and has since closed down. This time in Oklahoma rather than in Texas. Unfortunately, the owner went bankrupt and the property is in dispute. Lawsuit mentions of ownership are unclear.

20200513/https://www.vice.com/en_us/article/wxe3k9/this-abandoned-computer-store-is-a-time-capsule-of-early-2000s-tech

Wow, reading into this article, it really gives me vibes of the other Wired article about Ross (lastname I don’t remember) of Silk Road. And, well there’s full circle here. The main persona of the article himself was also involved with Silk Road, though from the standpoint of a younger, later-comer. Any mention of Minecraft servers and clickfraud on ads??? Oh, that was that later article about the massive DDoS that came about as an evolved gamer corner thing.

20200513/https://www.wired.com/story/confessions-marcus-hutchins-hacker-who-saved-the-internet/

So, who is this? This is Marcus Hutchins, who on one side, was the person who stopped WannaCry from ravaging across the entire world. And, on the other, the person who years before that, participated in writing the majority of a very nasty banking trojan. The FBI caught up a few years later, and then he was sentenced for his past crime. Interesting, weighing the sentence terms in combination of the great good he done after the crime.

Read on →

While searching for an elusive screwdriver-like tool that was distributed with a RadioShack soldering iron, well I didn’t find the tool, but I did find this good shopping list of electronics tools. A lot to learn and look at in there.

20200513/DuckDuckGo soldering driver tool
20200513/https://www.fpvknowitall.com/ultimate-fpv-shopping-list-tools/

Wow, now this is an interesting find. Are there methods to doing an approximate square root in floating point? Yes, it would merely be a modification of the method to do an approximate inverse square root in floating point. Indeed, the method does use the trick I’ve been using, base 2 logarithms are the key for the first approximation. With floating point, it’s merely a shift right on the integer interpretation of the bits. This manipulates the exponent fairly cleanly but turns the significand/mantissa into garbage. So then, it goes further and uses one iteration of Newton’s method to obtain a better approximation.

However, please note that on modern hardware, there are direct instructions for computing square roots and inverse square roots with floating point numbers. Because they are so fast… purportedly it’s not necessary to provide approximate variations. from an instruction set architecture standpoint. The approximate method in software was only fast for a short period of time when CPUs lacked the instruction.

20200513/DuckDuckGo floating point approximate square root
20200513/https://en.wikipedia.org/wiki/Fast_inverse_square_root

Multiplying by a power of two in binary integers is easy: just shift left. Purportedly, it should be easy in floating point by just adding to the exponent, so long as the number is not in denormalized form. But, C doesn’t have an operator to do this, why not? The reason is that most instruction set architectures don’t have an efficient means to do this directly on floating point registers, and round-tripping between memory and floating point registers is expensive.

20200513/DuckDuckGo floating point multiply by power of two
20200513/https://stackoverflow.com/questions/12919184/why-doesnt-a-compiler-optimize-floating-point-2-into-an-exponent-increment

That’s a real bummer that you have to pay this price in energy consumption when computing with floating point. But, we’re pretty much stuck with it, so long as we use general-purpose CPUs rather than specialized DSPs or your own FPGA design.

Wow, this is interesting. Some companies are having trouble with AI algorithms being unable to adapt to the rapid swings observed because of Coronavirus. The cause? Often times, AI is bought from an external specialist who builds it, and the operator has no knowledge on how to maintain it. The models are only trained on somewhat bad day scenarios, but not absolute disasters. It therefore takes a data scientist to intervene and connect algorithms with real-world events.

20200512/https://www.technologyreview.com/2020/05/11/1001563/covid-pandemic-broken-ai-machine-learning-amazon-retail-fraud-humans-in-the-loop/

The game theory of job interviewing

2020-05-12

Categories: random  
Tags: random  

Game theory of job interviewing.

Why is the interview conducted? It is for the benefit of the employer to try to optimize the utility of the resulting employee that fills the position. But what does this mean?

Let’s start with a hypothesis test to explain it.

Null hypothesis: Employee contributes zero intended results to the desired position, but gets paid full for the time. Result: salary paid out is full loss.

Alternate hypothesis 1: Employee contributes zero intended results to the desired position, but gets paid full for the time. However, they also cause additional damages not requested along the way. Result: salary paid out plus cost of damages is full loss.

Okay, now let’s cover the remainder of the hypotheses in dimensions, since multiple can apply.

Dimension: Employee contributes partially or completely to the desired position. Result: salary paid out for corresponding results.

Dimension: Employee contributes bonus materials: although they were not originally requested, they are found to be desirable and beneficial in ways not originally imagined.

Read on →