tag:blogger.com,1999:blog-91156446058333841382024-03-13T21:16:17.380+01:00X de XavierUnos y ceros. A veces, en el orden adecuado.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-9115644605833384138.post-20434567677149368272011-04-12T21:08:00.004+01:002011-04-12T21:26:30.686+01:00Are we unprofessional?From <a href="http://twitter.com/#!/unclebobmartin">Uncle Bob</a>'s <a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"><i>Clean Code</i></a>, discussing the pressures that professionals get to deliver unacceptable quality:<br /><div><blockquote><i>What if you were a doctor and had a patient who demanded that you stop all the silly hand-washing in preparation for surgery because it was taking too much time? Clearly the patient is the boss; and yet the doctor should absolutely refuse to comply. Why? Because the doctor knows more than the patient about the risks of disease and infection. It would be unprofessional for the doctor to comply with the patient.</i></blockquote></div><br />Ouch! What a great metaphor! It really hurts, but it is also a brilliant invitation to get vocal when one needs to get vocal.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com1tag:blogger.com,1999:blog-9115644605833384138.post-22992039334772395932009-01-19T17:30:00.006+01:002009-01-19T17:57:27.493+01:00A button to make it simpler to paste notes: urlsI often paste links to Lotus Notes documents (mostly mail messages) in my tiddlywikis. Creating a toolbar button that puts the notes: url in a field makes it simpler. Unfortunately, LotusScript does not provide a way to access the clipboard, so you have to manually select the text and copy it there.<br />Create a new toolbar button and paste this code inside:<br /><div style="overflow: scroll;"><pre><br />dn := @Subset(@DbName; 1);<br />linkType:= "Document";<br />nsfPath := @WebDbName;<br />qualifiedHost := @If(@Length(dn) = 0; ""; @DbLookup("":""; dn:"names.nsf"; "($ServersLookup)"; dn; "SMTPFullHostDomain"));<br />dbUrl := "Notes://" + qualifiedHost+ "/" + nsfPath;<br />viewUrl := dbUrl + "/";<br />docUrl := viewUrl + "/" + @Text(@DocumentUniqueID);<br />docTitle := @If(@IsAvailable(Subject);Subject;@IsAvailable(Title);Title;@IsAvailable(FullName);FullName;@Name([CN];@Author));<br />clipboardTxt := "[[" + docTitle + "|" + docUrl + "]]";<br />@Prompt([OkCancelEdit]; "TiddlyWiki link"; "Copy the text below to the clipboard."; clipboardTxt)<br /></pre></div><br />I posted this long ago in my intranet blog, and looks that can also be useful outside. The code was adapted from something that <a href="http://mrfeinberg.com/">Jonathan Feinberg</a>, of <a href="http://www.wordle.net/">Wordle</a> fame, wrote for a then young and great <a href="http://www.ibm.com/software/lotus/products/connections/dogear.html">Dogear</a>, a bookmarking service that ended up being one of the key components of <a href="http://www.ibm.com/software/lotus/products/connections/">Lotus Connections</a>.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-61951872900661391612008-12-10T23:21:00.003+01:002008-12-11T00:39:31.296+01:00Pushing agility from the business side?<div style="padding: 3px; text-align: left;"><a href="http://www.flickr.com/photos/xverges/3099036368/" title="Pushing agility from the business side?"><img src="http://farm4.static.flickr.com/3094/3099036368_8e1f12a965.jpg" style="border: 2px solid rgb(0, 0, 0); width: 400px;" alt="" /></a><br /><span style="margin-top: 0px;font-size:0;" ><a href="http://www.flickr.com/photos/xverges/3099036368/">Pushing agility from the business side?</a>, originally uploaded by <a href="http://www.flickr.com/people/xverges/">-Xv</a>.</span></div><p>A possible scenario:<br /><br /><b>1.</b> IT happy with status-quo: Big Design Up Front and Waterfall.<br /><b>2.</b> Stakeholders accept non-agility as a fact of life.<br /><b>3.</b>Tell stakeholders that they are entitled to learn, to defer<br />decisions until the have more info, to change their opinion. That some<br />of their competitors use those right to their advantage.<br /><b>4.</b> Stakeholders will push agility upon IT<br /><br />Just in case it helps Ferran Rodenas to get some idea to <a href="http://www.rodenas.org/blog/2008/12/09/thoughts-on-software-development-methodologies/">break the status-quo</a></p>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-72785246669360712282008-12-09T16:11:00.002+01:002008-12-09T16:27:59.488+01:00Some notes about troubleshootingFrom <a href="http://www.whyprogramsfail.com/">Why Programs Fails: A Guide to Systematic Debugging</a>:<br /><br />Some terminology: from defects to failures<br /><ol><li>The programmer creates a <span style="font-weight: bold;">defect</span>.</li><li>The defect causes an <span style="font-weight: bold;">infection</span> (the program state differs from what the programmer intended)</li><li>The infection propagates</li><li>The infection causes a <span style="font-weight: bold;">failure</span> (an externally observable error in the program state).<br /></li></ol><br />Debugging can be decomposed into seven steps:<br /><blockquote><span style="font-weight: bold;">Track</span> the problem in the database<br /><span style="font-weight: bold;">Reproduce</span> the failure<br /><span style="font-weight: bold;">Automate</span> and simplify the test case<br /><span style="font-weight: bold;">Find</span> possible infection origins<br /><span style="font-weight: bold;">Focus</span> on the most likely origins:<br /><small> Known infections</small><br /><small> Causes in state, code, and input</small><br /><small> Anomalies</small><br /><small> Code smells</small><br /><span style="font-weight: bold;">Isolate</span> the infection chain<br /><span style="font-weight: bold;">Correct</span> the defect<br /></blockquote><br />Note the <span style="font-weight: bold;">TRAFFIC</span> mnemonic.<br /><br />Opinion ON:<br /><br />That's nice theory. Unfortunately, the complexity of IT has teached us that computers are non-deterministic beasts. The first thing that we do in case of a problem is restart the system, hope that the problem will go away, and be able to keep doing our job. And it often works.<br /><br />But we, software developers and support technicians, need to <span style="font-weight: bold;">un-learn our hide the symptoms urge</span>. If we suspect that there is some defect in the code (and trust this old software developer, you can be confindent that it very likely that there is one),<span style="font-weight: bold;"> our goal should always be to find the defect</span>, instead of changing things so that the defect is not executed or the infection does not end up causing a failure. Leaving that defect unfixed is very likely to cause pain in a future situation. À la <a href="http://www.pragprog.com/the-pragmatic-programmer/extracts/coincidence">programming by coincidence</a>.<br /><br />Some advice<br /><ul><li>avoid corrective actions before the issue is understood. Before the failing code is identified, you should <span style="font-weight: bold;">only use temporary corrective actions to help you frame the problem</span>. I'm guilty of having neglected this rule lots of times, and requested customers to just upgrade the code to see if the issue goes away.<br /></li><li>when possible, use tools that <span style="font-weight: bold;">minimize the infection propagation</span> (that, crash as soon as possible). On Windows, I was recently introduced to <a href="http://support.microsoft.com/kb/286470">pageheap</a> and I'm in love with. More on it another day.</li><li>defects come from source code:<span style="font-weight: bold;"> give support technicians access and knowledge to read the source code</span>. Support people and developers should change seats quite often.<br /></li></ul>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com1tag:blogger.com,1999:blog-9115644605833384138.post-4793036752745954102008-11-19T10:56:00.003+01:002008-11-19T11:46:51.502+01:00Certificate-based logon to zOSDCAS (zOS Communications Server's <span style="font-weight: bold;">Digital Certificate Access Server</span>) has come to my rescue. <a href="http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.halg001/f1a1f230282.htm">From the docs</a>:<br /><br /><blockquote>The DCAS can be used by providers of logon and single sign-on services where access to z/OS-based applications is needed. The DCAS is a TCP/IP server that enables clients to connect over the network and obtain a passticket and z/OS user ID from RACF.<br /><br />Clients that connect to DCAS must use the SSL protocol (DCAS supports SSL Version 3). Client authentication is performed.<br /><br />Clients can request a user ID and passticket for an application. The client sends an x.509 certificate. DCAS converts the x.509 certificate to a valid user ID, which is returned. The x.509 certificate must have been mapped to a valid user ID in RACF </blockquote>It's the second time in a few months that DCAS is the solution to the problem that I'm working on; unfortunately, I had forgotten about the first time, so it has taken my a while to get rescued. Not a complete waste of time: if learned a few things about PKI and RACF.<br /><br />The first time it was about a service to generate passtickets (strings that can be used as passwords for a short while). Despite my recommendation, the customer's choice was to not use DCAS and code it from scratch; go figure.<br /><br />Now it is about authenticating to RACF from a application that uses a smartcard reader. I'm looking forward to code the smartcard-based RACF logon, since working with smartcards has been in my wish list for very long.<br /><br />And since google and DCAS don't seem to be big friends, I'm posting this.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-5352220647801615052008-10-07T21:23:00.005+01:002008-10-07T21:35:56.040+01:00DRAE restfulEsto es<span style="font-size:78%;"> </span><a href="http://rae.es/chulo"><span style="font-size:78%;">http://rae.es/</span>chulo</a> ! Y es que, <a href="http://blog.whatfettle.com/2008/10/06/the-uri-is-the-thing/">la URI es lo suyo</a>.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rae.es/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.rae.es/RAE/Noticias.nsf/autoridades.jpg" alt="" border="0" /></a>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-88180263064648878302008-09-27T22:12:00.003+01:002008-09-27T22:31:54.456+01:00sprintf_s() is not snprintf()You are compiling some legacy code with Microsoft Visual Studio. You get a warning telling you<br /><span style="font-style: italic;">warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead</span>.<br />Of course! So you just change that dangerous <span style="font-weight: bold;">sprintf()</span> for a <span style="font-weight: bold;">sprintf_s()</span>. The IDE tells you about an additional buffer size parameter, so you may wrongly end up thinking that you are getting the equivalent to Unix's <span style="font-weight: bold;">snprintf()</span> or the old MSV <span style="font-weight: bold;">_snprintf()</span>.<br /><br />Nope. If you read the <a href="http://msdn.microsoft.com/en-us/library/ce3zzk1k%28VS.80%29.aspx">docs</a>, you'll learn that <span style="font-weight: bold;">sprintf_s()</span> is not truncating the string, but instead invoking the run-time invalid parameter handler, and usually terminating the program. Far better than letting a buffer overflow happen, but maybe not what you were expecting.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-19679646295793728682008-09-24T14:12:00.004+01:002008-09-24T14:31:27.651+01:00Happy Stop Software Patents Day!<a href="http://stopsoftwarepatents.org/"><img src="http://stopsoftwarepatents.wdfiles.com/local--files/banners/banner-x60.png" border="0" /></a><br /><br />The problems with software patents go <a href="http://stopsoftwarepatents.org/petition">far beyond those trivial patents</a> that get linked from time to time.<br /><span style="font-size:78%;"><br />Usual disclaimer </span><span style="font-size:78%;">(stolen from <a href="http://readthisblog.net/">Read This Blog!</a>) </span><span style="font-size:78%;">applies here specially: IBM has its opinions and plans; I have mine. Any resemblance between the two is coincidental</span>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-25832717787084280092008-08-03T15:23:00.003+01:002008-08-03T15:37:50.659+01:00Falta chico con experienciaUno ya se va acostumbrando a que el papel del programador <a href="http://codeclimber.blogspot.com/2008/04/all-i-need-is-programmer.html">no se valore mucho</a>, incluso por gente que se supone mejor informada, pero esta perla me ha hecho reir:<br /><blockquote style="font-style: italic;">Falta chico con experiencia en programación PHP, AJAX, MySql, sistemas, etc. También precisamos un diseñador gráfico manejando bien Photoshop y Flash. Interesados enviar CV con datos completos, teléfono de contacto y horario para llamar. Si cumples el perfil puedes tener una entrevista de inmediato.</blockquote>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-72502087932607268072008-06-11T20:07:00.002+01:002008-06-11T20:20:56.094+01:00SuperHappyDevHouseBarcelona pollsBaby steps towards having <span style="font-style: italic;">a hackathon event that combines serious and not-so-serious productivity with a fun and exciting party atmosphere</span>: <a href="http://xdexavier.blogspot.com/2008/06/superhappydevhousebarcelona-why-not.html">SuperHappyDevHouseBarcelona</a>... two polls:<br /><ul><li><a href="http://www.doodle.ch/participation.html?pollId=7y9mm94ssvxdq6ix">Would you be interested in an event of this kind?</a></li><li><a href="http://www.doodle.ch/participation.html?pollId=zppb7iybqpvm7kxm">How about a beer/coffee next week to get things started?</a><br /></li></ul>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-10861103648480963462008-06-01T02:27:00.002+01:002008-06-02T22:41:35.298+01:00SuperHappyDevHouseBarcelona? Why not?<b></b><blockquote><a href="http://superhappydevhouse.org/"><b>SuperHappyDevHouse</b></a> is a non-exclusive event <b>intended for creative and curious people</b> interested in technology. We're about knowledge sharing, technology exploration, and ad-hoc collaboration. Come to have fun, build things, learn things, and meet new people. It's called <b>hacker culture</b>, and we're here to encourage it.</blockquote>I've been wanting to attend to something similar to <a href="http://superhappydevhouse.org/">SuperHappyDevHouse</a> since I first heard about it years ago, thanks to an intranet post by <a href="http://tlau.org/">Tessa Lau</a> telling how much she enjoyed <a href="http://superhappydevhouse.org/SuperHappyDevHouse11">one</a>.<br /><br />It shouldn't be too hard to find a handfull of people in Barcelona interested in <span style="font-style: italic;">a hackathon event that combines serious and not-so-serious productivity with a fun and exciting party atmosphere</span>. Summer nights are nice, and probably there are higher chances to find available venues. <a href="http://termie.pbwiki.com/HowToDevHouse">Mmm...</a><br /><br />Next actions:<br /><ul><li>get first reactions from fellow hackers (and hopefully draft co-organizers)<br /></li><li>explore some venue candidates. I don't have high hopes of finding one that allows a dusk-dawn event (the format of the first editions), but a shorter/earlier hackaton would also be cool.</li></ul><br /><object height="335" width="400"><param name="movie" value="http://www.youtube.com/v/SYLekr6fsiY&hl=en"><param name="wmode" value="transparent"><embed src="http://www.youtube.com/v/SYLekr6fsiY&hl=en" type="application/x-shockwave-flash" wmode="transparent" height="335" width="400"></embed></object>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-37426488785599259172008-03-04T23:37:00.005+01:002008-03-05T00:24:13.796+01:00Debugging Emergency Kit<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_T679aggANRU/R83ParVxhAI/AAAAAAAAAD0/OLlZmbRrMXs/s1600-h/RubberDuckAndDebugging.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_T679aggANRU/R83ParVxhAI/AAAAAAAAAD0/OLlZmbRrMXs/s320/RubberDuckAndDebugging.png" alt="Debugging and the scientific method" id="BLOGGER_PHOTO_ID_5174019604136166402" border="0" /></a><br />The image above is the hand-out of the last talk I gave. <a href="http://compsci.ca/blog/rubber-ducks-help-best-with-computer-science/">Rubber ducks have long been known as one of the most effective debugging devices</a> [1].<br /><br />Very often, while debugging, you *know* that you are almost there. The problem is that, before you notice, the morning has gone by with you being "almost there". If you don't really get there after a couple of quick and dirty iterations and want to avoid wasting a morning "almost there", it is very useful to make explicit the steps that everyone takes while debugging: enter your notebook and the scientific method (quoting from <a href="http://www.st.cs.uni-sb.de/zeller/">Andreas Zeller</a>'s <a href="http://www.whyprogramsfail.com/">Why Programs Fail: A Guide to Systematic Debugging</a>)<br /><ol><li>Observe a failure</li><li>Invent a hypothesis consistent with the observations</li><li>Use the hypothesis to make predictions</li><li>Test the hypothesis by experiments and further observations<ul><li>If the experiment satisfies the predictions, refine the hypothesis</li><li>If the experiment does not satisfy the hypothesis, create an alternate hypothesis<br /></li></ul></li><li>Repeat steps 3 and 4 until the hypothesis can no longer be refined<br /></li></ol>Keeping a written track of the steps is the key here. The advice is quite obvious, but we often forget about obvious things that work very well [2].<br /><br /><span style="font-size:85%;">[1] This is not the only surprising ability of rubber ducks: <a href="http://en.wikipedia.org/wiki/Rubber_duck#Oceanography">http://en.wikipedia.org/wiki/Rubber_duck#Oceanography</a><br />[2] I'm writing this post after a most ineffective "almost there" afternoon</span>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-7892907673614189982008-01-20T23:22:00.000+01:002008-01-20T23:37:36.424+01:00dreamer, coder, hacker<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm3.static.flickr.com/2285/2197292703_306b403598_d.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://farm3.static.flickr.com/2285/2197292703_306b403598_d.jpg" alt="" border="0" /></a><br />Diagram by <a href="http://blog.whatfettle.com/">Paul Downey</a> (of the <a href="http://blog.whatfettle.com/2007/10/31/the_web_is_agreement/">Web Is Agreement</a> fame), based on (I think) an <a href="http://www.flickr.com/photos/premshree/139060355/in/set-72057594128817548/">idea</a> by Y!'s <a href="http://disgruntle.net/">Spo0nman</a>/<a href="http://www.flickr.com/people/pankaj/">Pankaj</a>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com2tag:blogger.com,1999:blog-9115644605833384138.post-66276975024241146802007-12-06T00:07:00.001+01:002007-12-06T11:44:38.062+01:00Happy Geek Dad<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.briggs.net.nz/log/wp-content/uploads/2007/09/cover-tn.png" alt="" border="0" /></a><br /><a href="http://www.pythonware.com/daily/##entry4229308871869825098">Stumbled upon</a> Jason R. Briggs' <a href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/">Snake Wrangling for Kids</a>:<br /><blockquote>"Snake Wrangling for Kids" is a printable electronic book, for children 8 years and older, who would like to learn computer programming. It covers the very basics of programming, and uses the Python programming language to teach the concepts. Examples are presented for Windows, Mac OS X and Linux.</blockquote>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-38767480061489785962007-12-05T23:42:00.000+01:002007-12-05T23:49:38.465+01:00You are flying! How?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://xkcd.com/353/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_T679aggANRU/R1cqoJHt2BI/AAAAAAAAAC8/6G-pk3fdK-I/s320/xkdc-python.png" alt="" id="BLOGGER_PHOTO_ID_5140624368798128146" border="0" /></a><br /><div style="text-align: center;"><a href="http://xkcd.com/353/">Read the rest of the strip</a><br /></div>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-68501944382327851562007-11-30T00:17:00.000+01:002007-11-30T01:38:00.131+01:00Yay! Barcelona Python Meetups are here!Back from the first <a href="http://python.meetup.com/185/">Barcelona Python Meetup Group</a> event. The event was good, with two talks:<br /><ul><li><a href="http://www.linkedin.com/pub/0/a5/280">Maik Röder</a>, based on the <a href="http://tarekziade.wordpress.com/2007/09/24/eight-tips-to-start-with-python/">Eight tips to start with Python</a>. Maik added an additional tip (use <a href="http://divmod.org/trac/wiki/DivmodPyflakes">PyFlakes</a>, a faster PyChecker) and asked the attendants for our own tips: <a href="http://ipython.scipy.org/moin/">IPython</a> (a great shell that I should be using again) proved to have many fans! I mentioned my love for <a href="http://docs.python.org/lib/module-ctypes.html">ctypes</a>.</li><li><a href="http://jardigrec.eu/">Ramon Navarro Bosch</a>, on Design Patterns in Python. Ramon recommended us <a href="http://www.aleax.it/">Alex Martelli</a>'s <a href="http://video.google.com/videoplay?docid=-3035093035748181693">Google TechTalk video</a> on the topic.<br /></li></ul>If the event was good, the post-event (beers, croquetas and bravas) with Maik was great and I'm bringing home lots of food for thought. Most of the talk was about <a href="http://www.openplans.org/projects/funittest/project-home">Funittest (<span style="font-style: italic;">Making it easy to go from use case to functional test</span>)</a>. Maik uses daily a high level Test Driven Development flow:<br /><ul><li>write the functional test, to get aligned with the user's needs/customer value,<br /></li><li>write unit test, that can be driven faster and focus in the approapiate level of abstraction</li><li>write the code</li></ul>My impression is that his ideas have lots of commonalities with <a href="http://fit.c2.com/">Fit</a> and <a href="http://fitnesse.org/">Fitness</a>, and the story-based-testing that they advocate. Maik said that Funnitest's theoretical foundation can be grasped in <a href="http://blogs.msdn.com/micahel/archive/2005/05/04/FromAccountantToScientist.aspx">The Braidy Tester articles</a>; I'm adding them to my to-read list...<br /><br />Beyond functional testing, the programmer's flow, the business-technical gap, Barcelona, Sevilla, tele-working... an intriguing an promising idea: the I-told-you-that-this-was-a-wrong-decision year-end bonus.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-924225900593695212007-10-22T00:15:00.000+01:002007-10-21T23:44:53.680+01:00We make mistakesEveryone makes mistakes. Some times we are aware of them, some times we are not: looks like putting the blame of mistakes in someone or something is part of our nature. It's a pity, because we let pass by lots of learning opportunities.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://flickr.com/photos/srslyguys/1207374447/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://farm2.static.flickr.com/1139/1207374447_559295ffea_m_d.jpg" alt="" border="0" /></a><span style="font-size:78%;"> Flickr picture by <a href="http://flickr.com/photos/srslyguys/">srslyguys</a></span><br /></div><br />We software engineers are lucky enough of being faced in our trade with lots of mistakes that we cannot blame in any one but ourselves. Of course, some mistakes allow allocating blame on our customer, our team, our tools... My teammates often hear me cursing loudly Bill Gates or Linus Torvalds, but they know I'm jocking: we are experienced enough to know that <a href="http://pages.citebite.com/b2i2d5v2n1rxq">select isn't broken</a>. When writing code, you rarely can put the blame on someone/something else unless you are a pathological liar; that's good.<br /><br />I would like to think that having to face our daily mistakes helps us weaken our blame-someone-else voice in other areas of our life, but, honestly, I don't have any evidence about it. But, just in case, I'd like my kids to learn the <span style="font-style: italic; font-weight: bold;">we make mistakes, we learn from them</span> lesson/mindset, and this has been one of the main drivers in getting our new home pet, <a href="http://xdexavier.blogspot.com/2007/09/happy-and-secret-co-owner-of-nxt-kit.html">a Lego Mindstorms NXT Robot</a>.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-41629243131415135092007-09-22T11:43:00.001+01:002007-09-22T11:46:37.859+01:00Why interpreted programming languages suck<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://xkcd.com/303/"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand" src="http://imgs.xkcd.com/comics/compiling.png" border="0" alt="" /></a>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-56874112632067671062007-09-22T11:21:00.000+01:002007-09-22T10:58:04.407+01:00XUL templates and tabs<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xulplanet.com/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.xulplanet.com/images/xulplanet.png" alt="" border="0" /></a><br />I had some problems using <a href="http://www.xulplanet.com/tutorials/xultu/templates.html">XUL templates</a> to populate <a href="http://www.xulplanet.com/tutorials/xultu/tabpanel.html">a tabbox</a> using a RDF data source: the tabs were created, but switching tabs did not work. Avoiding the use of inline templates and <a href="http://www.xulplanet.com/ndeakin/archive/2003/10/1/">moving the template outside of the tabbox element</a> solved this. Looks like the tabbox was confused by the <tabs> and <tabpanels> elements inside the <template> node.<br /><div style="overflow:scroll"><pre><code><br /><template id="tabTemplate"><br /> <tabs><br /> <tab uri="rdf:*" label="rdf:http://multirunner.blah/rdf#name"/><br /> </tabs><br /> <tabpanels><br /> <tabpanel uri="rdf:*"><br /> <label value="rdf:http://multirunner.blah/rdf#name"/><br /> </tabpanel><br /> </tabpanels><br /></template> <br /><tabbox id="rdftabbox" <br /> datasources="rdftabs.rdf" <br /> ref="http://multirunner.blah/tabs" <br /> template="tabTemplate" /> <br /></code></pre></div>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com1tag:blogger.com,1999:blog-9115644605833384138.post-36712788404107253082007-09-11T18:32:00.000+01:002007-09-11T19:18:04.050+01:00Virtual gaming, leadership and agile software development<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://domino.research.ibm.com/comm/www_innovate.nsf/pages/world.gio.gaming.html"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://domino.research.ibm.com/comm/www_innovate.nsf/pages/world.gio.gaming.html/$FILE/gamingreport.jpg" alt="Report cover" border="0" /></a><br />As I was reading the excellent <a href="http://domino.research.ibm.com/comm/www_innovate.nsf/pages/world.gio.gaming.html">Virtual Worlds, Real Leaders</a> by <a href="http://www.seriosity.com/leadership.html">seriosity</a> and IBM's <a href="http://gio.typepad.com/about.html">Global Innovation Outlook (GIO) team</a>, I was struck with the similarities of the leadership attributes that they found in MMORPGs (Massively multiplayer online role-playing games) and those that are familiar to me from working in agile software development projects.<br /><br />I'm quoting two summaries that appear in the report:<br /><blockquote>Online gaming environments facilitate leadership through:<br />1. Project-oriented organization<br />2. Multiple real-time sources of information upon which to make decisions<br />3. Transparent skills and competencies among co-players<br />4. Transparent incentive systems<br />5. Multiple and purpose-specific communications mediums</blockquote><blockquote>In fast moving distributed environments, leadership can be:<br />1. A temporary phenomenon<br />2. Task-oriented<br />3. Dynamic and constantly changing</blockquote><br />Doesn't this make you think about how the daily scrum/stand up meeting and collective code ownership provides "<span style="font-style: italic;">transparent skills and competencies among co-players</span>"? About how the leading roles in an agile team changes constantly among team members depending on the task at hand? About the fluid communications in the noisy room where the team is sitting?-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-70210677744317020972007-08-06T16:30:00.000+01:002007-09-22T10:53:09.140+01:00XUL persist annoyancesXUL Elements have <a href="http://www.xulplanet.com/references/elemref/ref_XULElement.html#attr_persist">a persist attribute</a>, that is documented as<blockquote>A space separated list of attributes that are maintained when the window is closed. When the window is re-opened, the values of persistent attributes are restored. In Mozilla, persistent attributes are stored in the per-profile file localstore.rdf. Persistence can also be stored using the document.persist function. In order for persistence to work, the element must also have an id.</blockquote> I've learned some things about it today:<br /><ul><li>It does not seem to work for the "value" attribute of "textarea" elements</li><li>It is stored as <a href="http://www.xulplanet.com/tutorials/mozsdk/rdfstart.php">RDF</a><br /></li><li>It asks for some quite verbose code if you need to access to it<br /></li></ul><div style="overflow:scroll"><pre><code><br />var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].<br /> getService(Components.interfaces.nsIRDFService);<br />var rdfLocalStoreDS = Components.classes["@mozilla.org/rdf/datasource;1?name=local-store"].<br /> getService(Components.interfaces.nsIRDFDataSource);<br />var rdfRes = rdfService.GetResource("uri of interest after about in localstore.rdf");<br />var screenXRes = rdfService.GetResource("screenX");<br />var screenYRes = rdfService.GetResource("screenY");<br /><br />if (rdfLocalStoreDS.hasArcOut(rdfRes, screenXRes) &&<br />rdfLocalStoreDS.hasArcOut(rdfRes, screenYRes)) {<br />var screenX = rdfLocalStoreDS.GetTarget(rdfRes, screenXRes, true).<br /> QueryInterface(Components.interfaces.nsIRDFLiteral)<br />var screenY = rdfLocalStoreDS.GetTarget(rdfRes, screenYRes, true).<br /> QueryInterface(Components.interfaces.nsIRDFLiteral)<br />window.moveTo(screenX.Value, screenY.Value);<br /></code></pre></div>I failed to call <code>QueryInterface(Components.interfaces.nsIRDFLiteral)</code> for quite a while of wasted time. In <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=391044#c2">another piece of code that I wrote</a>, this was magically called for me by checking <code>if (target instanceof Components.interfaces.nsIRDFLiteral);</code> I need to get a better understanding of Mozilla's component model mechanisms... I also failed to use "Value" with a capital letter, to add up to the waste. :-(-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-63059799618048678252007-08-04T01:04:00.000+01:002007-08-04T17:55:03.219+01:00SendTo Clipboard coolness (TiddlyWiki links to your files)The SendTo folder is a simple and powerful tool to customize Windows Explorer to simplify some recurring tasks. If you often want to link to files in your PC from your TiddlyWikis, you'll like this hack. It creates two new items in the "Send To" menu:<br /><ul><li><span style="font-family:courier new;">clipboard - file url</span>: Copies to the clipboard the file: url of the file or folder that was showing the "Send To" menu</li><li><span style="font-family:courier new;">clipboard - new tiddler javascript url</span>: Copies to the clipboard a javascript: url that, when pasted into the address bar of a Firefox tab showing a TiddlyWiki, will create a tiddler with the contents of the file that was showing the "Send To" menu<br /></li></ul><br />You can jump and just download and run the thing, <a href="http://xdexavier.googlepages.com/path2twlink.hta">a small .hta file</a>, or take less than three minutes watching it in action in one of the lamest screencasts ever:<br /><object type="application/x-shockwave-flash" data="http://vimeo.com/moogaloop.swf?clip_id=261215&server=vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=00ADEF" height="300" width="400"> <param name="quality" value="best"> <param name="allowfullscreen" value="true"> <param name="scale" value="showAll"> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=261215&server=vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=00ADEF"></object><br /><span style="font-size:78%;"><a href="http://vimeo.com/261215">SendTo Clipboard Screencast</a> from <a href="http://vimeo.com/xdexavier">Xavier Vergés</a> and <a href="http://vimeo.com/">Vimeo</a></span><br /><br /><span style="font-weight: bold;">Using it<br /></span><ul><li>Just download the .hta file and open it. No, wait! Never open .hta files unless you trust its author or you have taken a look at the code.</li><li>Provided that you trust me or that you have checked the code, you can now open it. Maybe a double click will be enough (your Windows associates .hta files to <span style="font-family:courier new;">mshta.exe</span>, a version of IE with high security privileges in your machine). Maybe you need to use the command line and type <span style="font-family:courier new;">mshta path2twlink.hta</span>.</li><li>Follow the simple steps described in the .hta file, and you can start using your new shinny Send To menu items.</li><li>You are expected to edit the file to customize what gets copied into the clipboard. It should be easy. You may get ideas to push the sendto+clipboard+javascript urls concept further; adding them to the tool should not be too hard.</li><li>You are also expected to do some dancing, since this is <a href="http://xdexavier.blogspot.com/2007/08/upcoming-dancelikematthardingware-half.html">DanceLikeMattHardingWare</a>.<br /></li></ul><span style="font-weight: bold;">Lessons learned while hacking<br /></span><ul><li>I initially wanted to use just a .js file. Getting access to the clipboard from a .js file is hard, so I went for an .hta. It turned out to be a good thing, because it ended up providing a way to avoid to the users the trouble of creating the shortcuts by hand and to me the trouble of documenting the recipe.</li><li>The problem of using an .hta file is that I found no way to keep it invisible, that it has an unusual way to receive its params, and that I had to warn you about its dangerousness.</li><li>I think that I've spent more time recording the lousy screencast and comparing video hosting services that coding. The number of times that I rerecorded the #@%! thing will remain undisclosed; I have my pride. Regarding the hosting services, after reading <a href="http://pascal.vanhecke.info/2006/10/31/screencasting-online-video-sharing-sites-compared-2">about</a> <a href="http://209.85.135.104/search?q=cache:a5H_UzfisBsJ:www.gnurou.org/blog/gnurou/2007/07/30/comparing_google_video_vimeo_and_blip_tv&hl=en&amp;amp;amp;amp;amp;amp;amp;amp;amp;ct=clnk&cd=10" title="sorry, cached version">them</a>, I posted the video to <a href="http://video.google.es/videoplay?docid=1620076739328504497">google</a>, <a href="http://blip.tv/file/327653/">blip.tv</a> and <a href="http://www.vimeo.com/261215">vimeo</a>. <del><br />I still have no winner, but google's video quality was awfull, so I had to drop it despite its super cool feature of letting you link to a specific point of the video.</del> <span style="font-weight: bold;">Update</span>: looks like the winner is <a href="http://viddler.com">http://viddler.com</a>: links, comments and tags on specific points of the video, plus the best player of all (in full screen mode, showing the original size, the quality was just perfect): <a href="http://www.viddler.com/explore/xdexavier/videos/1">http://www.viddler.com/explore/xdexavier/videos/1</a><br /></li></ul>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com2tag:blogger.com,1999:blog-9115644605833384138.post-36171151279229827012007-08-02T13:37:00.000+01:002007-08-06T08:53:42.199+01:00Upcoming DanceLikeMattHardingWare (half cooked hacks)I have a longish backlog of hacks worth cleaning up and publishing<br /><ul><li><span style="font-weight: bold;">FoxyHistory</span>, a better Firefox History Manager. Having the ability to include urls when searching, and to sort the history by date of first visit has already saved me some time trying to restore some foggy memories.<br /></li><li><span style="font-weight: bold;">TiddlyWiky SendTo Shortcuts</span>, that allow to easily create customized links to files in a tiddlywiki and tiddlers with the contents of a file <span style="font-size:85%;">(Thanks for that <a href="http://groups.google.com/group/TiddlyWiki/browse_frm/thread/fa8a27d2f13f94fd/e26f38c207160ceb?#e26f38c207160ceb">first implementation</a>, <a href="http://groups.google.com/groups/profile?enc_user=cfb74xEAAADNzp8KVNaUwGY7xBgmxhfBIZ6HvvJW0y4Pue0pYgAOJQ">-- F.</a>!)</span><br /></li><li><span style="font-weight: bold;">MultiTiddlyWiki</span>, that allows to have a bunch of tiddlywikis in a single Firefox tab. Specially nice when used with the terrific <a href="http://wiki.mozilla.org/WebRunner">WebRunner</a>, a XULRunner based <a href="http://www.hawkwings.net/2006/05/13/a-dedicated-distraction-free-browser-for-gmail/">distraction-free browser</a> <span style="font-size:85%;">(Thanks for <a href="http://groups.google.com/group/GTD-TiddlyWiki/browse_frm/thread/c7a877fbd76a4363">the link</a>, <a href="http://groups.google.com/groups/profile?enc_user=EZKFZB4AAAAiViFfWiEmN7zhal_9mEZS3PARwrFCXyGvkdrowEPjtw">schilke</a>!)</span></li></ul>I also had a <a href="http://xkcd.com/">xkdc</a> (<span style="font-style: italic;">a webcomic of romance, sarcasm, math, and language</span>) specific bookmarklet, but I just learned about the <a href="https://addons.mozilla.org/en-US/firefox/addon/1715">Long Titles Firefox extension</a> that obsoletes it.<br /><br />I think that I'll make the hacks available as <span style="font-weight: bold;">DanceLikeMattHardingWare</span>:<br /><blockquote>You are free to do with this whatever you fancy, but you are expected to do some small <a href="http://video.google.com/videoplay?docid=4333821212636205852#2m53s">à la Matt Harding dancing steps</a> now and then.<br /><br />If you are too serious to dance, consider changing some things in your life, or just use it under some form of <a href="http://en.wikipedia.org/wiki/Beerware">beerware</a> or <a href="http://creativecommons.org/">Creative Commons</a> licensing.</blockquote><br /><a title="Matt Harding in Berlin" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.wherethehellismatt.com/"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_T679aggANRU/RrbS6EOtDsI/AAAAAAAAACk/lPAMwz74sK0/s320/matt_in_berlin.jpg" border="0" alt="Matt Harding in Berlin" id="BLOGGER_PHOTO_ID_5095491923425955522" /></a>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-48657567271202332262007-05-16T23:22:00.000+01:002007-05-16T22:29:27.496+01:00Coding Contest in Second LifeJust good an email from <a href="http://www.linkedin.com/in/christophsteindl">Christoph Steindl</a>, a former IBM colleague, where he used to co-lead the Agile@IBM community and write an excellent blog.<br /><br />Are you familiar with the Coding Wars in <a href="http://www.amazon.co.uk/gp/product/0932633439?ie=UTF8&tag=xdexavie-21&linkCode=as2&camp=1634&creative=6738&creativeASIN=0932633439">Tom DeMarco and Tim Lister's Peopleware</a>?<img src="http://www.assoc-amazon.co.uk/e/ir?t=xdexavie-21&l=as2&o=2&a=0932633439" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" height="1" width="1" /> Christoph is into something similar: the cool <a href="http://catalysts.cc/index.php?id=contest">Catalysts' Coding Contest (CCC)</a> that his company is running:<br /><blockquote><ul><li>Who is faster? Who is more efficient? Who is more effective? Who is more productive?</li><li>Does "Pair Programming" really make you faster?</li><li>Does "Test-Driven Development" really lead to fewer bugs?</li><li>How many ways are there to solve a problem?</li><li>Is it right that good developers only write 30 lines of code for which mediocre developers need to write 300 lines?<br /></li></ul><a href="http://catalysts.cc/">Catalysts</a> organizes a coding contest to go further into some of these questions. </blockquote>They will be running the contest in Linz, Austria (with post food and beverages) and in Second Life (do avatars drink and eat?).<br /><br />Looks like a bright idea to me. I bet that having participants with different backgrounds, and letting anonymous participation will provide coders and organizers useful insight. I don't know if other companies do this sort of thing internally, but it looks like very interesting way to get information, a honest measurement <a href="http://www.transformingperformancemeasurement.com/">not linked to rewards and punishments</a> (note to self: bring this to IBM's internal <a href="http://services.alphaworks.ibm.com/thinkplace/">ThinkPlace</a>).<br /><br />I'm even considering ignoring my usual too-busy-with-real-life-to-get-me-a-second-life to be able to <a href="http://catalysts.cc/index.php?id=525&L=0">participate via Second Life</a>.-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0tag:blogger.com,1999:blog-9115644605833384138.post-15832266459537218162007-05-11T16:25:00.000+01:002007-05-11T16:43:24.142+01:00gotApi: docs at your fingertipsStumbled upon gotApi.com. Its <a href="http://start.gotapi.com/">Fast Api Search</a>, covering HTML, CSS, JavaScript, C++, Python, Java, Flickr... is fast, pretty and extremely useful.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.gotapi.com/contribute/index.html"><img style="margin: 0px auto; display: block; cursor: pointer;" src="http://www.gotapi.com/contribute/chart.gif" alt="" border="0" /></a>-Xvhttp://www.blogger.com/profile/12954073038736466058noreply@blogger.com0