A blast from the past

Any resemblances?

1973-era flowchart:

ASP.NET rants

One thing I hate about SqlDataSource + GridView / DetailsView is the lack of partial updates, why the hell do I need to maintain the values for all the fields in a record so they all get updated, it’s a nonsense. Presuming you have user roles, guess what, I can’t hide the fields users aren’t supposed to see as they get NULL’ed in the database when the record is updated :( .

Programming attitudes

- Enterprise Architect

-

Nokia Accessories

Did you know that Nokia has some fashionable or high-tech accessories, exciting and disruptive as Nokia has always been:

Nokia Fashion Jewelry Collection

Nokia Digital Pen

Simply write on paper with this pen and it will save an image of what you’ve written, image that you can get it on your mobile via Bluetooth.

Response.Redirect ThreadAbortException

Response.Redirect, in an attempt to mimic the old ASP behavior of stopping execution of the current page at the moment it is reached, raises a ThreadAbortException that is then catched by ASP.NET that performs the redirection. This is certainly overkill, just pass false as the second parameter and then be careful to exit the current function.

infoweekly

Mihai Pătraşcu, one of the most promising researchers in algorithms and data structures I know has recently started a blog: infoweekly.

The two envelopes problem

Interesting paradox, not resolved yet, give it a try: :P

The setup: Let’s say you are given two indistinguishable
envelopes, each of which contains a positive sum of money. One envelope
contains twice as much as the other. You may pick one envelope and keep
whatever amount it contains. You pick one envelope at random but before
you open it you’re offered the possibility to take the other envelope
instead.

The switching argument: Now, suppose you reason as follows::

  1. I denote by A the amount in my selected envelope
  2. The probability that A is the smaller amount is 1/2, and that it’s the larger also 1/2
  3. The other envelope may contain either 2A or A/2
  4. If A is the smaller amount the other envelope contains 2A
  5. If A is the larger amount the other envelope contains A/2
  6. Thus, the other envelope contains 2A with probability 1/2 and A/2 with probability 1/2
  7. So the expected value of the money in the other envelope is

    {1 \over 2} 2A + {1 \over 2} {A \over 2} = {5 \over 4}A

  8. This is greater than A, so I gain on average by swapping
  9. After the switch I can denote that content B and reason in exactly the same manner as above
  10. I will conclude that the most rational thing to do is to swap back again
  11. To be rational I will thus end up swapping envelopes indefinitely
  12. As it seems more rational to open just any envelope than to swap indefinitely we have a contradiction

From Wikipedia.

Art software

If you have some spare time and want to try becoming an artist, here’s some specialized software to play with :

Resolume – the software used by VJs all over the world

Arduino – an electronic board with a microcontroller to command devices based on sensor input

Openframeworks – a library for opengl animations and visualisations

Processing – a programming environment used to build visual installations etc

Some pictures of Barcelona

Mainframe hung

Suppose you have a view in a CControlBar, when you undock (float) the bar with that view active the mainframe will hung (menus won’t open, it won’t resize, all because WM_LBUTTONDOWN messages are not sent / received at all, they are eaten somewhere). The behaviour seems like when SetCapture is somewhere else or the window is disabled, though this is not the case.

Well, anyway, seems there’s a problem with views on control bars, CSizingControlBar author Cristi Posea posts here more details, I’ve succeeded to fix the issue by creating a CFrameWnd parent on the control bar.