Tuesday, October 29, 2013

GParted Partition Manager

I run Ubuntu on a VirtualBox system, where I had reserved somewhat too little diskspace for getting our build system to work there (esp. when you have to build a specific gcc version up-front). While it's no problem to increase the size of the virtualized disk within VirtualBox, the partitioning within this disk, particularly of the root partition (the one that Ubuntu is actually running on), might turn out to be difficult to change on -the-fly. I then found and applied GParted to assign the additional disk space to the root partition, which - despite a "potential data loss risk" warning - worked like a charm.

Wednesday, October 23, 2013

Mutexes Vs. Semaphores

"A mutex is really a semaphore with value 1"
No, no and no again. Unfortunately this kind of talk leads to all sorts of confusion and misunderstanding
While mutexes indeed are similar to binary semaphores, there is one significant difference: the principle of ownership. And fortunately Niall picked up that up in his excellent series on Mutexes vs. Semaphores. Here is part 1, part 2 and part 3.

Another one, more compact explanation comes from Michael Barr in Mutexes and Semaphores Demystified.

Tuesday, October 15, 2013

C Operator Precedence

Original 1982 net.lang.c posting by Dennis Ritchie. "Several hundred kilobytes of source code, and maybe 3 installations", I guess that explains it :-) 

From decvax!harpo!npoiv!alice!research!dmr Fri Oct 22 01:04:10 1982
Subject: Operator precedence
Newsgroups: net.lang.c

The priorities of && || vs. == etc. came about in the following way.

Early C had no separate operators for & and && or | and ||.  (Got that?)  Instead it used the notion (inherited from B and BCPL) of "truth-value context": where a Boolean value was expected, after "if" and "while" and so forth, the & and | operators were interpreted as && and || are now; in ordinary expressions, the bitwise interpretations were used.  It worked out pretty well, but was hard to explain. (There was the notion of "top-level operators" in a truth-value context.)

The precedence of & and | were as they are now.

Primarily at the urging of Alan Snyder, the && and || operators were added.  This successfully separated the concepts of bitwise operations and short-circuit Boolean evaluation.  However, I had cold feet about the precedence problems.  For example, there were lots of programs with things like

if (a==b & c==d) ...
In retrospect it would have been better to go ahead and change the precedence of & to higher than ==,  but it seemed safer just to split & and && without moving & past an existing operator.  (After all, we had several hundred kilobytes of source code, and maybe 3 installations....)

Dennis Ritchie

Monday, October 14, 2013

Stop The NoSQL Hype

It was about time someone puts a stop sign to that NoSQL hype. Thank you Google for F1.

Monday, October 07, 2013

Java Stack Map Tables

I really wonder whether Sun/Oracle ever considered how the introduction of Java Stack Map Tables within the Java 6 classfile specification (optional back then), resp. their enforcement by the Java 7 bytecode verifier is hurting the existing Java Agent / Profiler ecosystem. The whole problem is summed up pretty well in Java 7 Bytecode Verifier: Huge backward step for the JVM.

Wednesday, October 02, 2013

Windows File Search

As Microsoft just can't get Windows File Search right for 15+ years, it's simply necessary to switch back to one of those nifty tiny tools like Everything Search, that does the job just perfectly.


Friday, September 27, 2013

Very Sleepy

"Very Sleepy" is a nice little tool for profiling native code, and has helped me a already a great deal on several occasions. It samples all threads of a running application, an aggregates the result. Plus it's pretty smart in resolving external symbols, e.g. from the Microsoft symbol server. Great job!


Wednesday, September 04, 2013

Tuesday, June 25, 2013

Java Garbage Collection Tuning

Excellent introductory article on Java Garbage Collection Tuning by Sun/Oracle. I think every Java programmer should be aware of those basics. 

Different GC algorithms (serial / parallel / concorrent-mark-sweep) are discussed here, as well as how to use Java VM options for chosing among them.

And if you pass

-Xloggc:[file] -XX:+PrintGCDetails -XX:+PrintGCDateStamp

to your VM, you can feed the resulting GC logfile to a tool like GCViewer (for support for the latest VM versions, use GCViewer from GitHub), and create results like this:


Friday, May 10, 2013

Review Board

I have recently discovered Review Board, which is a great code review tool - free even for commercial use, powerful, yet easy to use. Back in 2008 I had already been in search for a review tool that would plug into Visual Studio and Team Foundation Server, but didn't find any good ones. Review board had already been around back then, I should have used it, even if there was no specific integration for TFS. I hear that Visual Studio 2012 now provides a code review feature, which is nice, but this comes a little bit late...

Friday, April 26, 2013

Widget Factory Software Organizations

Vlad Gudin beautifully expresses what our profession most suffers from (extracted from this stackexchange posting):



Widget Factories are born out of management school of thought revolving around motivation Theory X proposed by McGregor: rank employees are lazy and require constant control and supervision, jobs are held in the name of a pay check, managers are always able to do their subordinates' jobs to the higher or, at least, same standard. This thinking lands to a natural idea that the entire team can easily be replaced with and represented by the manager alone - after all everyone else on the team is either easilly replacable or there just to enhance manager's ability to complete tasks. Hence the hierarchy as a structure and rather horizontal job roles.
Widget Factory management operates on the assumption that software can be manufactured out of a specification prepared by a business analyst through a clearly defined process run under the close supervision of a project manager. The manufacturing is taken care of by staffing the project with enough qualified yet interchangeable programming and testing resources. Work is driven by a prearranged budget based on the initial business case prepared by PM and BA.
Management that runs a Widget Factory is easy to spot just by paying attention to the way these people talk. They are likely to be on about resources (including when referring to team members), processes, operating efficiency, uniformity, repeatability, strict control over use of resources, clear-cut job roles and defined process inputs and outputs. They'd casually mention the actual factory metaphor when trying to convey the image of the ideal software development operation as they see it.
Now, it won’t come as a surprise that most in-house software development teams and some consultancies are run as Widget Factories relying on a process to produce consistently boring software.

Related Postings: