Saturday, February 11, 2017

Veganism is not a black and white idea.

If a person is both vegan and anti abortion, which do you hear first ? So goes the joke...

The main reason I know for abstaining from meat or animal derived products is harm reduction. This is based on utilitarianism. The view that the pain and suffering the animal goes through from inception to slaughter outweighs the pleasure we derive from consuming it. This conclusion is a bit more intuitive if we factor in the amount of meat we consume as well as how much of it is thrown away or misused. But then, all this is a question of degrees. It doesn't have to be an all or nothing thing. 

I am all for feeling gulity of consuming meat when I could have chosen a nutritionally equivalent plant-based meal. I doubt this position is original, but it nonetheless deserves some thought. For example, in arctic climates, agriculture is impossible, so meat is the only source of nutrition. I can hardly see someone seriously propose veganism to people living like Inuits (used to, or maybe still do). The same for people raising their own pigs and chicken then consuming them once a year. The only time a year they actually do consume meat. It's not unheard of to both enjoy the meat and feel sad at the loss of the animal you hand fed.

Edge cases apart, I also have no beef with occasional consumption of meat, even in modern societies. 

On the "harm spectrum", we have bio and/or organic food. This is not bullshit. For meat products to qualify as organic, there are measurable standards to be enforced. It can be argued that organic grown animals suffer less than non organic ones. 

Then there is the plain distinction between animal products and animal meat. I feel less remorse when eating organic products compared to organic meat. The following are all things to factor in when choosing your next meal.
  1. Animal products vs meat.
  2. Organic vs non organic 
  3. Occasional vs regular consumption
  4. Amount thrown away.
At one end, you have the regular double triple extra meat burger consumer, most of it he throws away, versus the occasional organic egg buyer. None qualify as vegan, but one is much more reasonable than the other.

Far from being an absolutist annoying concept, meat and animal products consumption should be thought of a bit more, in my humble opinion.

Friday, February 10, 2017

Drilling & the meaning of a black belt (to me)

There are black belts and there are Black belts. Trust me. Whereas a few short years ago I couldn't tell the difference between a purple and a back belt, now I can quantify the difference between a black belt and a great one. In addition to regular class time add another 1 to 2 times more drilling time, as well as strength and conditioning.

I can't even imagine how good I could have been by now, had I dedicated serious drilling time to the techniques that work best for me. On top of some 2000 hours of mat time, I could have another 4000 in drilling. But of course, drilling is boring compared to a regular class. Who can seriously dedicate 20-30h a week of their time just in jiujitsu only?

And there are black belt champs. I seriously wonder what their secret is. More drilling ? More rolling ? An even stronger mind ? Talent ?

Regardless, what unites the three black belts is their experience and ability to teach. The least common deniminator of black belts should be, in my opinion, the ability to learn and teach by themselves.

I wonder what my jiujitsu will look like in 5 or 10 years from now ? Some of the athleticism will be gone. I will have to rely even more on technique.

Wednesday, December 2, 2015

Mind-body problem, emergent property

Even respected neuroscientists, for example Rudolph Tanzi from Harvard, still struggle with the fallacy of division. They look at the brain with the latest tools available, learn all the current theories about how neurons function, find out some new stuff along the way, but still get confused, and that is just sad. They say consciousness cannot be encoded into fat and water and DNA, therefore souls exists, and we have a "life after death". The failure here is understanding what an emergent property is. Allow me to explain, using a simple car analogy, since everybody loves these.

Take an engine and a transmission, and put it on top of a frame with wheels attached to it. Congratulations, you now have a car. One of the car's properties, is that it can move on its own. In short, it has the property called "locomotion". Now take the four pieces apart, and look at them individually. Can the engine lomocote ?Nope. What about the wheels. Neither. What about the chassis ? The transmission ? Nope and nope. None of the COMPONENTS of the 'car' has the property of locomotion, but the CAR ITSELF does. Therefore, locomotion is an emergent property of the system that CANNOT be assigned to any of its components.

The same with the brain. No, you cannot reduce consciousness to individual neurons, or neural nets, or anything else. Consciousness is a property of a well functioning brain. Let's stop the bullshit please.

A second, slightly unrelated and much shorter refutation of the mind-body problem is this : how can something immaterial, that is, completely OUTSIDE of the physical world, outside of the planet system, outside of the galaxy, outside of the universe, outside time and space - how can such a thing ACT upon, take CONTROL of something material such as the brain ? How do you make that connection between what is OUTSIDE the physical world, and make it work with the physical world ? And no, you can't use energy, or dark energy, since both exist in the physical world.

Monday, June 29, 2015

My thoughts after 10 years of software maintenance

I have been paid to maintain software systems for the last 10 years now. I've rarely started developing a system from scratch, so I guess we could say I've mostly maintained existing systems. This is probably the norm. Also, thanks to the open source movement, I've also seen the source code to at least as many systems I've worked on professionally, and I believe my conclusions still hold for those systems as well.

Managers often push for features first, and quality attributes later. This is understandable, and I don't think changing that focus would be a good idea, except :

- Improving software attributes first (such as speed, reliability, resource consumption, usability, maintainability) might open the door to new features which wouldn't have been possible before. If the system can calculate its results quickly, we may be able to provide feedback to the user quicker, in a more user-friendly way. If its UI is resizable, it may be usable on tablets. 
- A lack of focus on the system quality attributes will lead to a costly rewriting from scratch.

I have seen both cases first hand, and often times, because of a lack of leadership in programming conventions, speed standards or testing, programs slowly degrade to the point of having to be rewritten. That's a no-brainer. The new program might have a slightly different feature set, but the development team will have to prove itself to the client and develop quickly, at the risk of having the project cancelled. As a result, quality becomes once again an after-thought. It's something left for the maintenance team to deal with. This vicious circle repeats itself over and over, and good programmers often move on before they can make a lasting impact on the health of the program. 

My advice would be to continuously maintain standards in the code as well as in the development lifecycle, and have managers allocate time for working on the quality attributes of the system as well, probably as a percentage of the feature development time. Use that time to 
- correct things that have been left for later, 
- write unit and integration tests, etc.

Wednesday, June 17, 2015

.Net assembly loading problem

So I had a problem at work today. I built my .net winforms application in visual studio, copy the bin/ and 
make sure I can start the application locally without issue. Then I hand it over to someone else, and 
boom, the application won't even load, with this dialog box popping up.


I didn't have the option to debug the program, and I couldn't reproduce the problem where I was. 
So I had to find another computer, change the application build mode to Console, so my 
Console.WriteLine would actually show up. I've traced the problem to a missing DLL.

The issue was that a certain library wasn't deployed in the bin/ directory Visual studio built, but it 
So the solution was easy, once the problem was identified.
But this got me thinking, how can I detect this sort of problem ?
I've started playing with DebugDiag, and build my own little application which throws an Exception 
Since now I know beforehand what the problem was, I could focus on which tools allow me to debug it. 

was in the GAC for me.

when clicked. I've managed to generate dumps, and load the actual exception. But I couldn't get it to 
work with my real program. Debug simply didn't recognize my application crashing.

So I found three tools/solutions :

Method 1 : FUSLOGVW.exe (Assembly Binding Log Viewer)
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64

The tool itself is horrible. It won't log anything unless you set up the custom log path. Once that is done,
 here we go :

Method 2 : Ilspy.exe : (
  1. Simply load the main .exe file, and explore each referenced DLL. Here, The Krypton 
  2.  library just won't show up.

Method 3 : Process Explorer
This one is tricky. Add custom load rules in process explorer as follows

And look for failed dll lookups in the application directory :

Bonus points :
The event viewer was my key to success in this case :

But it didn't mention which file and why.

On some other computer, I didn't even get the famous error dialog box, so
I had to enable it :