tag:blogger.com,1999:blog-42895907708397477752024-03-10T02:46:41.593+00:00Bruno Lopes' Lack of imaginationBrunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.comBlogger44125tag:blogger.com,1999:blog-4289590770839747775.post-16405053204859790032015-07-23T12:30:00.001+01:002015-07-23T12:31:49.251+01:00Should I put 'project.lock.json' in source control?<p>TL;DR: <strong>No</strong></p>
<h2 id="why-not">Why not?</h2>
<p>If you depend on specific versions of dependencies, then the lock file contains the same information as project.json, but in an easier way for <code>dnx</code> to consume. As long as the specific versions you depend directly on are the same, <code>dnu</code> will always restore the same versions. </p>
<p>If you have floating dependencies, then you expect the dependencies to change frequently, and any package restore can create noise in source control whenever it picks up new versions. </p>
<h1 id="longer-reasoning">Longer reasoning</h1>
<h2 id="a-small-categorization-of-dependencies">A small categorization of dependencies</h2>
<p>Consider each of your dependencies as one of the following: <br>
- stable <br>
- fast moving</p>
<p>A stable dependency is one you consider to be fully featured, bug-free, ready to use and depend on. Newtonsoft.Json might be one, the latest stable release of RavenDB would be another, or an internal library that’s been in use for years and sees new versions once or twice a year. <br>
You want to ensure you’re always working with the version you tested on, and it’s ok to explicitly update that dependency when you need functionality from a new version, or a bug is fixed. <br>
You do not expect to have to update this dependency frequently. <br>
You target a specific version of such dependencies, like 1.2.3, or 4.0.0.</p>
<p>A fast moving dependency is one that you want to track the latest developments, either because it’s still under rapid development and you want to consume always the new functionalities and get the latest bugfixes, you want to know when it breaks your code, it’s being developed at the same time as your project, or it’s just another project that you develop in tandem and it is split for logical reasons, deployment lifecicles or reuse in other projects. <br>
If you’re trying out the latest versions of ASP.NET 5, you might consider beta-6 to be a fast moving dependency, and want to track all latest developments instead of having to manually check and update versions. <br>
In this case you target ranged versions, like 1.0.0-beta6-*.</p>
<h2 id="projectjson-and-projectlockjson">Project.json and project.lock.json</h2>
<p>The project.json file includes the dependencies for your project, besides other information like your project version, commands available for <code>dnx</code>. It then gets transformed into a <code>project.lock.json</code>, which contains the whole dependency tree, resolved into specific versions.</p>
<h3 id="projectjson">Project.json</h3>
<p>Your dependencies are defined on the project.json file.</p>
<p>You can have ranged versions:</p>
<pre class="prettyprint"><code class=" hljs bash"> <span class="hljs-string">"Microsoft.AspNet.Mvc"</span>: <span class="hljs-string">"6.0.0-beta6-*"</span>,</code></pre>
<p>And specific versions:</p>
<pre class="prettyprint"><code class=" hljs bash"> <span class="hljs-string">"Newtonsoft.Json"</span>: <span class="hljs-string">"7.0.1"</span></code></pre>
<p>These dependencies are used by <code>dnu restore</code> to generate or update the <code>project.lock.json</code> file, which contains all the transitive dependencies of your project, resolved to the specific versions to be used. </p>
<h3 id="projectlockjson">Project.lock.json</h3>
<p>This file is mainly used by <code>dnx</code> to load the required references for your project, instead of having to recalculate all the dependencies each time the application runs.</p>
<h4 id="locking-a-projectlockfile">Locking a project.lock.file</h4>
<p>When restoring packages with <code>dnu</code>, you can opt to lock the <code>project.lock.json</code> file with <code>dnu restore --lock</code>. This means that whatever versions <code>dnu</code> picks up are written into the lock file, and future <code>restore</code> executions will use the same versions, if they continue to satisfy the dependencies on <code>project.json</code>.</p>
<p>What happens is that <code>project.lock.json</code> will contain the <code>locked</code> property set to <code>true</code>, instead of the default false.</p>
<p>If the versions from the lock file do not satisfy the dependencies from <code>project.json</code>, because they changed in the meantime, then the lock file gets rebuilt.</p>
<p>Locking a <code>project.lock.json</code> file is only useful if you depend on ranged versions of a package/project, and it does nothing if you only depend on specific versions.</p>
<h3 id="how-are-versions-picked-for-a-specific-projectjson">How are versions picked for a specific project.json</h3>
<p>Dependency resolution is described <a href="https://github.com/aspnet/Home/wiki/Dependency-Resolution">here</a>, but for the purpose of this post there are two main points:</p>
<ul>
<li>By default, versions are considered to be “at least X”. So <code>"Newtonsoft.Json": "7.0.1"</code> means that at least you need 7.0.1.</li>
<li>It will pick the earliest version that satisfies all dependencies. So if you depend on A 1.0 and B 1.0, and A 1.0 depends on B 2.0, it will pick B 2.0.</li>
</ul>
<p>The result is that, for a <code>project.json</code> file that only contains specific versions, subsequent restores will always use the same versions. Hence the first point of section <strong>Why not?</strong>. </p>
<p>For ranged versions, <code>dnu restore</code> searches for the latest version of the dependency, and the rest of the resolution works as usual. This means that yes, a <code>dnu restore</code> done today can pick up later versions of a <code>dnu restore</code> done yesterday, which is point two of <strong>Why not?</strong>.</p>
<h3 id="options">Options</h3>
<p>Now that we know what are the main moving parts, here are the three ways a version gets resolved for a dependency:</p>
<ul>
<li>It is specified on project.json (no wild cards)</li>
<li>It is wildcarded on project.json, but locked on project.lock.json</li>
<li>It is wildcarded on project.json, and unlocked on project.lock.json</li>
</ul>
<p>The first case is used for stable dependencies. <code>Project.lock.json</code> is never changed unless you change <code>project.json</code>. </p>
<p>The last case is used for fast moving dependencies. Whenever there is a new version of such dependencies, <code>Project.lock.json</code> can change even if nothing else changes.</p>
<p>The middle case is a bit of an odd duck when thinking about stable/fast moving,but it is used when you want to track a fast moving dependency, but for now want to work with a version that you know doesn’t break your code. This is useful in large teams, where the team considers a dependency to be fast moving, but some developers want to stabilize it for a while.</p>
<h2 id="scenarios">Scenarios</h2>
<h3 id="be-notified-of-breaking-changes-on-upstream-projects">Be notified of breaking changes on upstream projects</h3>
<p>If you’re working on a project that depends on other projects, you can use a ranged dependency to always pick up the latest version. That way, you can have a build server checking new versions for problems, since it will always pick up new versions.</p>
<p>Locally, you can lock <code>project.lock.json</code> during a sprint or a feature to avoid getting sidetracked by upstream problems. Since the lock file isn’t commited, you can still get warnings from the build server, and handle them before merging back your code.</p>
<h3 id="branch-to-test-a-bugfix-for-a-library">Branch to test a bugfix for a library</h3>
<p>Consider you found a bug on version 1.42.0 of a library called XBuggy. You can create a branch in source control to test workarounds and fixes, and want to pick up new versions of XBuggy to test as they come up.</p>
<p>Instead of having to specifically update on each new version, you can depend on XBuggy 1.42.*. This means that on each restore, you can pick up new versions of the library. </p>
<p>When the bug is fixed, you then set the dependency to the version 1.42.3 that fixed the bug and merge it back to master.</p>
<h3 id="new-functionality-that-requires-new-versions-of-another-project">New functionality that requires new versions of another project</h3>
<p>If you have two separate projects that need to be developed in tandem for a given functionality, it is useful to use ranged versions while they’re in development.</p>
<h3 id="the-aspnet-5-scenario">The ASP.NET 5 scenario</h3>
<p>Looking at the github repos for ASP.NET 5, we see that most of the projects use ranged versions to get early warnings of breaking changes. This enables them to quickly move up new versions, with the option of locking versions for short periods.</p>
<h2 id="side-notes">Side notes</h2>
<p>One scenario where adding project.lock.json to source control is useful is if you want to run <code>dnx</code> without a <code>dnu restore</code> first, since <code>dnx</code> needs the lock file to run (at the time of this post). However, I’m not sure if this would ever crop up outside of my imagination.</p>Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com1tag:blogger.com,1999:blog-4289590770839747775.post-29853703815497455812011-04-15T16:24:00.000+01:002011-04-15T16:24:39.608+01:00Error 2 when trying to start windows event log serviceToday my Windows 7 machine couldn't start the windows event log service, and so I couldn't open the event log viewed.<br />
<br />
After a bit of troubleshooting I found out that the issue seemed with a particular registry key.<br />
<br />
Removing the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\parameters registry key allowed event log to start without problems.Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com1tag:blogger.com,1999:blog-4289590770839747775.post-89782193581049236042010-10-04T21:35:00.000+01:002010-10-04T21:35:00.154+01:00Zero-friction deployment: from local to github in one powershell command<p>Short version: </p> <p>Code is <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins/blob/master/upload_github.psm1" target="_blank">here</a>, depends on a dll <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins/blob/master/lib/Krystalware.UploadHelper.dll" target="_blank">here</a> and <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins/blob/master/lib/html.agility.pack/HtmlAgilityPack.dll" target="_blank">here</a>. Allows for a powershell script to upload a file to github.</p> <p>Long version:</p> <p>There are one core belief powering this post: </p> <p>- There should be zero friction in getting a software release out in the open. In the age of build scripts and APIs and everything over http there is no reason a human should be involved in cutting a version except in the decision to make it so.</p> <p>The main side effect of having very little to no friction in cutting a release is that it happens way more often, since there is no reason not to do it if the code is good to go.</p> <p align="left">In this particular case, all I lacked was a way to upload a file to github. The packaging was already done, courtesy of psake+write-zip. Having found nothing in the powershell world to do it, I ended up “porting” part of <a href="http://github.com/Constellation/ruby-net-github-upload/blob/master/lib/net/github-upload.rb" target="_blank">a ruby script</a>.</p> <p align="left">Github stores files in Amazon’s S3, so there were two steps to uploading a file: <br />-Telling github that the file exists and getting a token to pass to S3.</p> <p align="left">-Uploading the file itself to S3 using the token gotten from step 1.</p> <p align="left">The biggest issue ended up being that WebClient doesn’t handle POST’ing to an url with MIME values, which is what S3 expects in this scenario. Using the underlying *thingie* directly from powershell would bit a bit harder and more prone to errors, so I just used an existing <a href="http://aspnetupload.com/" target="_blank">helper</a> to upload the file correctly.</p> <p align="left">The powershell code that uses it is available <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins/blob/master/upload_github.psm1" target="_blank">here</a>, with another extra dependency on the <a href="http://htmlagilitypack.codeplex.com/" target="_blank">Html Agility Pack</a> to scrape the downloads page for info on existing downloads.</p> <p align="left">The function itself (not iet a full commandlet due to lack of time) is <em>upload_file_to_github:</em></p> <p>function upload_file_to_github($login, $repo, $api_key, $file, $filename, $description){ <br />    [void][System.Reflection.Assembly]::LoadFrom((get-item "lib\Krystalware.UploadHelper.dll")) <br />    <br />    $full_repo = $login+"/"+$repo <br />    $downloads_path = "<a href="http://github.com/"+">http://github.com/"+</a>$full_repo+"/downloads" <br />    <br />    $post = new-object System.Collections.Specialized.NameValueCollection <br />    $post.Add('login',$login) <br />    $post.Add('token',$api_key) <br />    $post.Add('file_size',$file.Length) <br />    $post.Add('content_type',"application/octet-stream") <br />    $post.Add('file_name',$filename) <br />    $post.Add('description',$description) <br />    $wc = new-object net.webclient <br />    $upload_info = [xml][System.Text.Encoding]::ASCII.GetString($wc.UploadValues($downloads_path, $post)) <br />    <br />    $post = new-object System.Collections.Specialized.NameValueCollection <br />    $post.Add('FileName',$filename) <br />    $post.Add('policy',$upload_info.hash.policy) <br />    $post.Add('success_action_status',"201") <br />    $post.Add('key',$upload_info.hash.prefix+$file.Name) <br />    $post.Add('AWSAccessKeyId',$upload_info.hash.accesskeyid) <br />    $post.Add('signature',$upload_info.hash.signature) <br />    $post.Add('acl',$upload_info.hash.acl) <br />    <br />    $upload_file = new-object Krystalware.UploadHelper.UploadFile $file.FullName, "file", "application/octet-stream" <br />    [void][Krystalware.UploadHelper.HttpUploadHelper]::Upload("<a href="http://github.s3.amazonaws.com/"">http://github.s3.amazonaws.com/"</a>, $upload_file, $post) <br />}</p> <p align="left">As you can see, it’s just a normal POST to the web to notify github of a new file, interpreting the response as xml to extract needed information for the S3 POST. That one uses the helper to pass the parameters as MIME-encoded values.</p> <p align="left">I have to say, using xml in powershell was a lot easier than I thought it would be. I wonder if JSON is equally well supported…</p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-77015360047903307882010-09-27T10:25:00.000+01:002010-09-27T10:25:00.196+01:00Blaze-IPP – Design choices and implementation<p>When I set out to create the support to code commands in IronPython, there were two main guidelines in my mind: simple commands and fast feedback.</p> <h4>Simple commands</h4> <p>Commands should only need to be a name and the definition of execute for the simplest of cases. No imports, just the code:</p> <script src="http://gist.github.com/587376.js"> </script> <p>This is the simplest way to define a command as of version 1.2. As you can see, there’s nothing that isn’t required, and simple shortcuts or expanders could be defined by a simple method</p> <p>The side effect is that even short or small tasks can be easily automated since there’s no ceremony.</p> <p>There are two main features to accomplish this guideline:</p> <ul> <li>Incrementing the scope with the extra classes and namespaces.</li> <li>Some “smarts” to allow for both methods and classes to be commands. </li> </ul> <p>Adding definitions to a scope is simple, since all we need to do is associate a value to a symbol:</p> <h4 id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">ScriptScope scope = _engine.CreateScope();</pre>
<!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </pre>
<!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">scope.SetVariable(<span style="color: #006080">"BaseIronPythonCommand"</span>, ClrModule.GetPythonType(<span style="color: #0000ff">typeof</span>(BaseIronPythonCommand)));</pre>
<!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">scope.SetVariable(<span style="color: #006080">"UserContext"</span>, UserContext.Instance);</pre>
<!--CRLF--></div>
</h4>
<p>Allowing for both classes and methods is also trivial, since we can filter the values on the scope by type after executing code. </p>
<p>Anything that’s a PythonType for which the CLR type can be assigned to an IIronPythonCommand is a command class.</p>
<p>Anything that is callable and a PythonFunction that doesn’t start with “_” is a command method.</p>
<h4>Fast feedback</h4>
<p>I shouldn’t need to reload the application just to pick up a new script or a change to an existing one. <a href="http://blaze-wins.sourceforge.net/" target="_blank">Blaze</a> should pick up changes from the file system and reload the files as needed.</p>
<p>Here the big issue was locked files when the “file changed” was triggered.</p>
<p>This meant that changed files were placed in a queue, and a timer running in the background pulled files from the queue and reloaded them. If a file is locked, then put it again in the queue. </p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-59580498958039063092010-09-20T10:30:00.000+01:002010-09-20T10:30:00.969+01:00Forked dbdeploy.net<p>Dbdeploy.net is a database change management library, used by us at weListen to track the changes made to a database in the scope of a project and apply them as needed. It takes a folder full of ordered files containing the change scripts in sql and applies them as needed to a given database. It tracks which changes have been applied in a special table.</p> <p>We’ve used for quite some time, and were mostly happy with it, except when using it from the command line on the servers. The msbuild task worked well to obtain and apply the changes, but the command line application added extra information to the output that needed to be trimmed before applying it to the server.</p> <p align="left">Well, it annoyed me enough to fork it from its <a href="http://sourceforge.net/projects/dbdeploy-net/" target="_blank">home</a> at sourceforge to a <a href="http://github.com/brunomlopes/dbdeploy.net" target="_blank">new place</a> at github. </p> <p align="left">I refactored to projects a bit, to exclude a direct dependency on NAnt, and added a Dbdeploy.Powershell assembly with 3 commands:</p> <ul> <li> <div align="left"><strong>Export-DbUpdate</strong>, which outputs the scripts that need to be applied. Can write the scripts directly to a file;</div> </li> <li> <div align="left"><strong>Push-DbUpdate</strong>, which applies the changes to the database (still has a bug when using with SQL Server, as I need to split the resulting script into batches);</div> </li> <li> <div align="left"><strong>Select-DbUpdate</strong> outputs information about which sets need to be applied;</div> </li> </ul> <p align="left">All of these commands take a path to a config file describing the database type, connection string and table name to store the changelog, and the directory where the actual changesets exist.</p> <p align="left">Also, instead of mucking about with NAnt as the build script host, I’m using psake. I really can’t stand using xml to describe build steps anymore.</p> <p align="left">To use it just download the release, and in powershell “import-module Dbdeploy.Powershell.dll”.</p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-73293112893504286512010-09-06T19:37:00.000+01:002010-09-06T19:37:59.531+01:00Anatomy of a commandCreating an IronPython command to launch the command prompt isn’t much, since you can have a shortcut to do just that.<br />
You might have noticed that the command subclasses “BaseIronPythonCommand”. This is an abstract class that implements the basics and just leaves the Name and the Execute method for you to implement:<br />
<a href="http://lh6.ggpht.com/_iGn-y-G_07U/THrnLfCWTmI/AAAAAAAAAas/sPREzed5yW8/s1600-h/image3.png"><img alt="image" border="0" height="276" src="http://lh4.ggpht.com/_iGn-y-G_07U/THrnMTlcP9I/AAAAAAAAAaw/rFkmAArbthk/image_thumb1.png?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="383" /></a><br />
There’s also an interface you can implement directly (IIronPythonCommand) if you want to assume control of everything.<br />
BaseIronPythonCommand’s implementation is quite simple. Most of it is boilerplate for a <a href="http://blaze-wins.sourceforge.net/" target="_blank">Blaze</a> plugin, leaving only the name and execution to be done in the script:<br />
<script src="http://gist.github.com/552424.js">
</script> <br />
<b>GetName</b> is the name used to invoke the command. It should be something unique and descriptive. A long name is good, and you can teach Blaze a shortcut to it by typing the shortcut and selecting the command on the dropdown box. This teaches blaze about the shortcut. <br />
<b>GetDescription </b>returns a description for the command, to be shown on the line below it on the interface.<br />
<b>AutoComplete</b> returns a completion for the given string. This means you can transform “off” into “office” inside your command.<br />
<b>Execute</b> tells the command the user has selected it. The command returns either a program to execute in the form of a path concatenated with the arguments, null if the command has executed itself.<br />
Any one of these can be implemented in ironpython, although for basic commands you only need to implement GetName (or a property called Name) and <b>Execute</b>.Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-14980747512453972552010-09-01T10:27:00.000+01:002010-09-01T10:27:00.230+01:00Tutorial: How to create your own plugins for Blaze-IronPythonPlugins (BPP)<p>On the first post in this series I presented <a href="http://blaze-wins.sourceforge.net/" target="_blank">Blaze</a> IPP, which allows for scripting of a launcher using IronPython. Here I tell you how you can write your own plugins from scratch. It will be a short post.</p> <p>First of all, I assume you’re already running Blaze with the plugin installed. </p> <p>Let’s create a new directory under “Plugins” to store our new plugins. This way if any future upgrade on IPP brings an ironpython file with the same name, your plugin will not be overwritten. We’ll call it LocalIronPythonPlugins:</p> <p><a href="http://lh3.ggpht.com/_iGn-y-G_07U/THbqXUNzXfI/AAAAAAAAAac/JH8jw7VAOyY/s1600-h/Untitled%5B2%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Untitled" border="0" alt="Untitled" src="http://lh5.ggpht.com/_iGn-y-G_07U/THbqYSWx6SI/AAAAAAAAAag/wUlXvWscm-0/Untitled_thumb.png?imgmax=800" width="244" height="119" /></a></p> <p>Now, configure IPP to also monitor that directory. Call Blaze, right click on it and in the “settings” open the “Plugins” tab. Select “IronPythonHostPlugin”, “Configure” and add the newly created directory (you can either browse to it with “b” or you can paste the path into the text box):</p> <p><a href="http://lh3.ggpht.com/_iGn-y-G_07U/THbqY_Jdl0I/AAAAAAAAAak/4sDzBJ0cg4U/s1600-h/Untitled2%5B4%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Untitled2" border="0" alt="Untitled2" src="http://lh4.ggpht.com/_iGn-y-G_07U/THbqZgu7v0I/AAAAAAAAAao/yp9zfj0v1fU/Untitled2_thumb%5B2%5D.png?imgmax=800" width="459" height="348" /></a></p> <p>Now that we have a clean directory to work with, let’s create a file called “OpenCommandLine.ipy”. Open it and add the following code:</p> <script src="http://gist.github.com/552373.js"> </script> <p>As you can probably guess, this will create a new command named OpenCommandLine, and when you select it it will open a new command prompt. IPP is clever enough to know that if a command returns a string, it is a program to be executed. </p> <p>This is just a simple example to get you started. Since this is IronPython, you can use the entire .Net framework and fetch things from the web, open the registry, connect to a remote host or start a service, to give a couple of examples.</p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-65932661859945226702010-08-30T10:25:00.001+01:002010-08-30T10:25:00.106+01:00Creating plugins in IronPython for Blaze, an application launcher.<p>Everyone loves the start menu from Windows Vista/7, but compared to Launchy, Quicksilver or any other application launchers it’s a bit anemic. No wonder, since it’s just a search over your start menu and indexed locations.</p> <p>But even any one of those is a bit lacking in support for runtime extensibility. You can create plugins, but it involves C (or Objective-C in the case of Quicksilver) and restarting the app. Not very friendly for those cases where you just want to pick up the currently selected object and throw it over an scp connection autocompleted from your favorites. </p> <p>Enter <a href="http://blaze-wins.sourceforge.net/" target="_blank">Blaze</a> + <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins" target="_blank">IronPythonPlugins</a>. Blaze is a .Net application launcher for Windows that includes a learning facility that tries to complete repetitive tasks for you. IronPythonPlugins is a plugin itself for Blaze that hosts simple plugins written in IronPython.</p> <p>If you want to try it just download the latest version from <a href="http://github.com/brunomlopes/Blaze-IronPythonPlugins/downloads" target="_blank">here</a>. It includes a version all ready to use. Start the app, call it with Ctrl+Alt+Space and try a couple of plugins:</p> <ul> <li> <div>Open windows explorer, select a text file, call blaze and type “edit with notepad2”. If you have notepad2 in your path, it will be launched with the selected file opened.</div> </li> <li> <div>If you use putty (the ssh terminal), “putty <name of session>” will launch putty with that session. Here session is autocompleted, so if you have a session called “my.home.box”, typing “putty home<tab>” will autocomplete to “putty my.home.box”.</div> </li> <li> <div>Type “random-text <number>” and your clipboard will have up to <number> random letters. Useful to generate test data.</div> </li> </ul> <p>There are a couple more plugins in the “Plugins\IronPythonPlugins” directory, so if you’re interested in how it’s done, open them in your editor of choice. In the next few days I’ll do a couple of posts on how you can create your own plugins without having to guess from the already existing ones.</p> <p>If you want to change anything edit the file, save it and Blaze will automatically pick it up, together with any other .ipy file in that directory that has changed. If you open Blaze’s configuration page for the plugin, you can add other directories to search for .ipy files. Useful to keep your personal plugins separated from the “official” ones.</p> <p>Sadly errors are still only sent to a System.Diagnostics.Debug, so if you edit a file and can no longer use it, open DbgView, edit the file again to force blaze to reload it and be on the lookout for output starting with “Error with file”. There will be a stacktrace telling you what you did wrong.</p> <p>So, try it, have fun and comment on it. I’d love to hear what other people think of it.</p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com1tag:blogger.com,1999:blog-4289590770839747775.post-18712663197133580462010-04-09T17:25:00.001+01:002010-04-09T17:25:33.256+01:00Toggling with an IEnumerator and yield.<p>
Instead of using a state variable to jog around and check what is the state of a window, why not just use an infinite collection?
</p>
<pre>
public partial class Admin : Window
{
private IEnumerator _toggler;
public Admin()
{
InitializeComponent();
_toggler = Toggler().GetEnumerator();
}
public void Toggle()
{
_toggler.MoveNext();
}
private IEnumerable Toggler()
{
while (true)
{
Show();
yield return new object();
Hide();
yield return new object();
}
}
}
</pre>
<p>
I wonder if this is a good pattern, or just me being "clever".
</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-43714666363338198072010-03-17T10:00:00.000+00:002010-03-17T10:00:03.356+00:00Using ironpython to generate nhibernate mapping files from a fluent
configuration<p>I admit, this is a bit of a goldberg machine, but here's the context:<br /></p>
<p>In my current project we need to store a bunch of events related to some 20 entities. Those events are the same for all entities, and they all need to be stored in the database. We use NHibernate to handle the "talk to the database" part, and fluent-nhibernate to configure the mappings via conventions for the most part. There are some entities which are either manually mapped or have specific overrides for particular cases (manually mapping some entities and automapping others is a mistake I think I'll avoid in the future).</p>
<p>For the most part this setup does wonders. We can add and change our entities and the mappings are generated without we thinking much of it. Since development speed has a larger priority than runtime speed in this project, we don't have much problems with the default mappings that are generated.</p>
<p>Except in the case of those events. Since the events are the same for all the entities, the event classes are open generics. Now, nhibernate can't map open generics, but can map closed generics, which is how we do it. We just iterate through all the types in the assembly that correspond to our entities and map those with fluent. The problem then becomes one of performance. As of now there are about 500 generated classes, and those take a while to discover and map. Since we're using fluent nhibernate to configure it in runtime, this means that each time the app is restarted there's a small downtime (on the scale of about 1 minute). While that's not much for an app in production, while developing one tends to restart the app a bit often. That's a problem in the day to day work.</p>
<p>I used our integration test suite to time the mapping, and on my pc it took about a minute to run. On the other hand, if we already have an .hbm file to feed to nhibernate, we can shave about 30 to 40 seconds. That's less than half the time for a simple trade-off of having to know when to generate the mappings.<br /></p>
<p>To generate the mapping we could have created a new console project to just call the correct methods on our session provider factory, which would be a bit overkill. All we needed was to setup the environment and ask fluent for the mapping file.</p>
<p>And here is something that IronPython shines in.</p>
<p>Just create an .ipy file, add references to the correct assemblies, and since there's a clear separation of concerns (or so we hope), it's easy to configure fluent and ask it to generate the mappings for us. Most of the time you'll use .net code like you do in c# or vb.</p>
<p>There are only a couple of issues here:</p>
<p>- We need to remember to regenerate the hbm files when classes/mapping changes</p>
<p>- We need to remember to recompile both before and after regenerating hbms. Since we're loading the assemblies with ironpython outside of visual studio, the script doesn't know if the assemblies are stale or not.</p>
<p>Most of this can be avoided by having a build server rebuild the hbm files on its own and fail the build if they don't match with the latest in the source control. Of course, we could just have it commit the files, but that's one step I'm not fully comfortable with.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-85142012651028452532010-03-10T10:00:00.000+00:002010-03-10T10:00:04.095+00:00Notes and reflections about the second annual scrum meeting in Portugal<p>A month ago I attended the second annual Scrum Meeting in Portugal, and ended up taking some notes about two of the presentations.</p>
<p>Here they are, both for the team at <a href="http://welisten.eu." title="weListen, Business Solutions">weListen</a>, and for the world at large.</p>
<p><b>Notes on "A Practical Roadmap to Great Scrum:A Systematic Guide to Hyperproductivity" presented by Jeff Sutherland</b></p>
<p>This was the presentation that changed the way I perceive scrum. Where before I saw scrum as an agile software development methodology like xp, now I see it as a management and process template. This means a team should use scrum and complement it with technical practices. Apart from that, the largest focus to me was on 3 velocity multipliers for teams and 2 required practices for hyper-productive teams.</p>
<p>The 3 velocity multipliers are <b>ready</b>, <b>done</b> and <b>self-organization</b>. Ready and done shield an iteration from churn. A story only enters development when it is ready, and by the end of the sprint it should be done. Ready means that the story is understood and sized by the team with input from the client, and done means the same story is tested and approved to be deployed. Self-organization ties nicely into the two required practices mentioned: <b>talk about problems</b> and <b>fix the same problems</b>.</p>
<p>Two classes of problems mentioned: bugs that take more than 8 hours to fix, and stories that take more than twice the calendar time than estimated ideal time. For each bug or story in this situation, do a root cause analysis to figure out the underlying problem. This can be multitasking (a dev assigned to several projects), final inspection or testing done too late or interruptions and form the basis of an impediment list for the team together with the product owner and scrum-master to solve.</p>
<p>There were several interesting data points mentioned. In a given company, the peak of productivity was measured on 60 hour work weeks in waterfall projects, and on 30 hour work weeks with double story points delivered. This means an productivity increase of about 3 to 4 times. Part of the presentation used Systematic, a dutch software company as the source for several data points for scrum teams. They noticed a linear scale in developer productivity for project sizes, going against Brook's Law, although I think the Law mentioned adding people to an already late project, and didn't mention scale. They apparently implemented scrum using Mary Poppendieck's lean tools as described in her <a href="http://www.amazon.com/exec/obidos/ASIN/0321150783/poppendieckco-20">book</a>.</p>
<p>Some "required truths" about hyper-productive teams were discussed, and I found them interesting insights. The ones that stuck to my mind the most were:</p>
<ul>
<li>Everyone must be trained in scrum. This is so that all the players follow the same playbook and the concepts and practices are well understood.</li>
<li>Backlog must be <b>ready</b> to implement before the sprint, and <b>done</b> by the end (tying into the concepts of ready and done mentioned earlier) .</li>
<li>Pair immediately on a task if there's only one person capable of handling it, to avoid bottlenecks in the throughput.</li>
<li>Short sprints (often just one week)</li>
<li>Servant leadership, where the product owner and scrum-master are a resource of the team, instead of using the team as a resource.</li>
<li>No multitasking. This one I'm a bit curious as to how realistic it is, considering maintenance work, and teams with many past projects.</li>
</ul>
<p>Overall it was a very interesting presentation. There are several videos on youtube with Jeff Sutherland about scrum. <a href="http://www.youtube.com/watch_popup?v=Ht2xcIJrAXo#t=351">This one</a> is very similar to the one I saw.</p>
<p><b>Notes on "Scrum and TFS 2010" by Mitch Lacey</b></p>
<p>This was mostly a storytelling and demo about new features in TFS. I did end up asking Mitch about the importance of accounting for time originally estimated, time in task and time remaining for small and recent to scrum teams, as to me it seemed a bit too much bureaucracy for a small team. The answer was enlightening, since those numbers are particularly important for those teams as a way to surface problems (either with estimation, delays, interruptions or other causes). This means I might start looking into accounting for such numbers. "You can't manage what you don't measure". When a team gels and is proficient, the numbers may not matter as the team starts getting into the groove and noticing impediments becomes intuitive.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-79401230025297553132010-01-24T01:19:00.000+00:002010-01-24T01:19:51.019+00:00OCD and filenames, as pertaining to TV seriesI like all my file names to be similar, and this applies to both mp3 and series. For mp3 I use the wonderful <a href="http://www.foobar2000.org/">foobar2k </a>to tag and rename files, but for series I ended up coding my own formatter. All this assumes a linux system (as is my home server, flatline)<br />
First of all, to extract the video files from the rars:<br />
<blockquote>
find -name "*rar" -type f -exec rar e {} \;<br />
</blockquote>
This extracts all rars from under the current directory (and subdirectory) into the working directory.<br />
If the files already come uncompressed, but are in subdirectories:<br />
<blockquote>
find -name "*mkv" -type f -exec mv {} . \;<br />
</blockquote>
Replace mkv with avi if that's what you've got.<br />
Now, sometimes the files come in different formats. Some have [season][episode], others [season]x[episode], and I'd like for them all to be in the same [title]S[season]E[episode] format.<br />
For that all you need is the following python script:<br />
<br />
<script src="http://gist.github.com/284901.js"></script>
<br />
It can take 2 arguments: the directory where the file names are, and a title that overrides the one found in the file names.
Hope this is helpful for someone else :)Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-9335980602874896312010-01-03T04:01:00.000+00:002010-01-03T04:02:20.856+00:00Just replaced the fan on my laptop<p>For a couple of months my macbook's fan has been a bit on the fritz. Sometimes when the CPU got a bit hot it started making some noises and once in a while stopped working completely.</p>
<p>The repair would most likely cost me about 100€ (50 for the fan, 50 for replacing it), so I decided to look up if anyone sold those. Thankfully a store in Hong-Kong does, and they ship international (they're called <a href="http://www.eeshops.com/" target="_blank">eeshop</a>). It took a while to get here (a month and a half, perhaps) but for 10€ that's not a big issue. I did ask after a while if it was supposed to take so long, and answer was prompt (apparently the postal office was swamped).</p>
<p><a href="http://www.flickr.com/photos/brunomlopes/4238171357/sizes/l/" target="_blank"><img src="http://farm5.static.flickr.com/4025/4238171357_877940870b_b.jpg" width="480" height="304" style="float:left;" /></a> Opening the laptop was another issue. First attempt failed when some of the screws were a bit too small for the screwdrivers I was using, so today I went and bought a new set with a better grip. After removing the screws, I just had to take care to remove the connection for the trackpad and slide the keyboard left to remove it. Opening it gave me access to the internals as you can see on the left. Replacing the fan was a matter of just removing the connector, two screws and taking it off. The right screw was hidden under some cables, but gently pulling them off gave me access to remove it.</p>
<p>I do have to say, putting it all back again was a bit difficult, since on the right hand there are some "hooks" that you need to slide the keyboard plate into, and that wasn't trivial. Other than that it was easy.</p>
<p>And now my laptop doesn't scream anymore when hot! And it cost me just about 15€ plus an hour and a half. Yay.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-6077670709186599502009-12-26T18:08:00.001+00:002009-12-26T18:10:07.813+00:00My presentation for netponto about Lucene.net<p>A couple of weeks ago I did a presentation for a .net user group (<a href="http://www.netponto.org/" target="_blank">netponto</a>) here in Portugal about Lucene.net, an open source textual search engine. You can see the slide deck <a href="http://www.slideshare.net/NetPonto/introducao-ao-lucenenet" target="_blank">here</a>, and I've uploaded the source code used in the demo to <a href="http://github.com/brunomlopes/netponto-lucene" target="_blank">my github page</a>.</p>
<p><b>What went well</b></p>
<p>Using git (with the git-extensions gui) to bookmark the various steps I wanted for the code demo. This is something that surprised me on how well it worked and actually ended up being remarked upon. It also generated a few questions about git that were answered mid-demo in a bit of a detour.</p>
<p>The pattern here is to build the demo as a series of linear git branches, each a small step in the demo, and instead of writing the code in-loco at the demo or storing snippets to be used, I just move up along the branches. Each step is small and self contained, and I spend more time just highlighting the important parts and the decisions I made and less time typing.</p>
<p>Also, using git gives me the advantage to rewrite history, so that if I figure out that the demo app needs to have a foo somewhere from the start, I can switch to the root branch, make the edit, and rebase the branches to update them with the change. With some care, this propagates the change upwards with little to no conflicts.</p>
<p>Short deck of slides, demo with ongoing q&a. While the initial presentation didn't take long, the demo ended up going into overtime. If there's no hard and fast timebox, this is good, otherwise answering questions in the middle of the demo can push a well timed demo out of its allotted time. But the audience seemed to be enjoying it, and I think this helps spread knowledge a bit better than just giving a presentation and showing code.</p>
<p><b>What could have been better</b></p>
<p>The "oh dear, a crash" gimmick had an interesting effect, but I think it was wasted on a slightly minor point. A better and more important part to emphasize would have been the impact of the analyzer on both indexed fields and search query. I should have had an unexpected result for a search be the "crash" and not the lack of values for fields.</p>
<p>I used a transition I saw on slide:ology in 3 slides, which while cool, might have been more distracting than useful. On the other hand, I think it emphasized the fact that the index was shared between the indexer and the searcher, which part of the point I was trying to make.</p>
<p><b>What I'll improve</b></p>
<p>Relax. Although the feedback I gathered from some of the audience was that it didn't show, I felt like I had zipped through the initial presentation. Ended up taking a bit of a breather while answering questions.</p>
<p>Might be interesting to consider dropping even more slides in detriment of more code. Although I think there's a minimum needed to intro the subject matter. Otherwise people will look at the code but the concepts will not gel.</p>
<p><b>Feedback</b></p>
<p>If you were there, I'd love to hear from you. I've received the report from Caio with the flattering comments, but I'd also love to hear your opinion on what could have been improved.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-32762250142273147702009-08-30T17:24:00.001+01:002009-08-30T17:24:52.793+01:00I wish I could put 4gb of ram on my macbook...<p>According to an article on <a href="http://news.cnet.com/8301-13579_3-10320314-37.html?part=rss&tag=feed&subj=News-Apple">cnet</a> Snow Leopard boots by default into a 32-bit kernel and mentions that macbooks with an older, 32-bit EFI chipset (which handles the early boot process) cannot boot the 64-bit version.</p>
<p>Although having a 64-bit kernel would be good, I'm more interested in the side effect of the 32-bit chipset memory limitation. The same article mentions that a 32-bit EFI chipset cannot address more than 3Gb of ram. Since most likely this is the chipset installed on my mac, I think that's the reason why 4 Gb are not supported. I wonder if the chipset could be replaced. Doubt it, since it must be soldered into the board.</p>
<p>Sadly, that's pretty much the largest reason I'm envious of the new macs. 2 gb isn't much, specially if you're like me and have tons of apps loaded all the time.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-85418393630819378212009-08-19T20:07:00.002+01:002009-08-20T14:55:19.723+01:00Man, it would be awesome to go...Roy Osherove is giving an hands-on TDD Masterclass in the UK, September 21-25. Roy is author of "The Art of Unit Testing" (<a href="http://www.artofunittesting.com/">http://www.artofunittesting.com/</a>), a leading tdd & unit testing book; he maintains a blog at <a href="http://iserializable.com/">http://iserializable.com</a> (which amoung other things has critiqued tests written by Microsoft for <a href="http://asp.net/">asp.net</a> MVC - check out the testreviews category) and has recently been on the Scott Hanselman podcast (<a href="http://bit.ly/psgYO">http://bit.ly/psgYO</a>) where he educated Scott on best practices in Unit Testing techniques. For a further insight into Roy's style, be sure to also check out Roy's talk at the recent Norwegian Developer's Conference (<a href="http://bit.ly/NuJVa">http://bit.ly/NuJVa</a>). <br /><br /><br />Full Details here: <a href="http://bbits.co.uk/tddmasterclass">http://bbits.co.uk/tddmasterclass</a><br /><br />Update:<br /><br />bbits are holding a raffle for a free ticket for the event. To be eligible to win the ticket (worth £2395!) you MUST paste this text, including all links, into your blog and email <a href="mailto:Ian@bbits.co.uk">Ian@bbits.co.uk</a> with the url to the blog entry. The draw will be made on September 1st and the winner informed by email and on bbits.co.uk/blogBrunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-20313448596855154842009-08-08T21:10:00.001+01:002009-08-08T21:10:33.221+01:00Windows 7 blues<p style="text-align: right;"><i>why haven't I learned yet not to go for first releases?</i></p>
<p>With Windows 7 reaching RTM status and the general low working demands of August, I decided it was time to kick Vista to the curb on my dev machine and get myself a brand new shiny OS.</p>
<p><b>Triple-headed Blue-screens</b><br /></p>
<p>Because it can never be two easy, the upgrade experience ended up being rather painful, with both attemps resulting in blue screens before the setup was finished. Deciding that perhaps it was some conflict with device drivers, one of the many programs I had installed or just bad luck, I decided to cut my losses and just repave the system partition to do a clean install.<br /></p>
<p>Still no joy. Same bluescreen at the end of the setup.<br /></p>
<p>The dev machine's most unusual part is the two NVIDIA display adapters installed on the PCI-E slots, which are used to drive 3 monitors. Remembering that vista also had some troubles with the secondary adapter, I removed it and gave it another shot.</p>
<p>Yap, that worked. Setup finished and gave me a brand new Windows 7 installation to play with.</p>
<p><b>You no like restart?</b></p>
<p>With a folder full of drivers for the display adapters, chipset, SATA controllers and audio, I spent some time updating them before heading home. Somewhere around the end ,after a restart, another bluescreen.<br /></p>
<p>That's no good.</p>
<p>After some fiddling I found out that it only happened on a restart, and never on a cold boot.</p>
<p>Oh well, that's a bother but at least it's work-around-able. Off I go to install sql server, visual studio and a miriad of essential software for a dev machine. Thankfully with portable apps living in a dropbox folder most of it takes little to no time at all.</p>
<p><b>System Interrupts should not interrupt all the time.</b><br /></p>
<p>Some time afterwards, while installing some software I decided to look at resource monitor as a source of "oh, look at all that data" entertainment.</p>
<p>And it showed "System Interrupts" using about 40% of the cpu, all the time. What. The. Hell. At first I thought it would have something to do with the troublesome display adapters, and reverting to the standard VGA adapter driver reduced the usage, but it still was too high (about 20, 25%)</p>
<p>Again, after some fiddling around, uninstalling drivers, disabling devices I found out that the problem was with the "Marver 88SE611 SATA V12069" drivers. Reverting the drivers to the default drivers makes the cpu usage go back to normal.</p>
<p>Sadly, the reboot bluescreen still appears from time to time. I think it always happened when the second display adapter was installed, but I'm not sure.</p>
<p><b>In a nutshell.</b></p>
<ul>
<li>When upgrading/installing, remove the secondary display adapter.</li>
<li>With two display adapters, don't reboot (away from the machine)</li>
<li>Don't install the Marvell SATA driver</li>
<li>Get a rabbit's foot.</li>
</ul>
<p>I do hope the reboot bluescreen gets fixed soon, but for now I'm happy with having a usable machine.</p>
<p>In the case someone has the same problem, this machine has the following specs:</p>
<ul>
<li>Core2Duo E8400</li>
<li>4 x 2Gb Kingston ValueRam</li>
<li>Asus P5Q Pro</li>
<li>NVIDIA 7300 LE</li>
<li>NVIDIA 7200 GS</li>
<li>Western Digital 150Gb Velociraptor</li>
<li>Seagate 200Gb</li>
</ul>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-77418307348987897942009-06-11T00:15:00.001+01:002009-06-11T00:25:40.347+01:00Dr. Googlelove or: How I Learned to Stop Worrying and Love the Cloud<p style="text-align: right;"><i>written in full blown hipster <censured> mode on a macbook, listening to an ipod and sipping an iced mocca at a starbucks.</i></p>
<p>Having three different machines that I work with daily tends to cause me some pain whenever I try to send an email from the two that are work/fun related. I've got 3 pcs that I use on a daily basis:</p>
<ul>
<li>My personal laptop is a black Macbook called mac-sendai. It handles my email, IM, photos, videos and contacts. My social life is stored in it, being it work or personal and I carry it around for most of the time.</li>
<li>My home machine is armitage. It's a Windows XP machine that I use mostly as a gaming/movie machine.</li>
<li>My work machine is 2finn. It runs Windows Vista 64 and is my main development machine at the office.</li>
</ul>
<p>From each of the 3 pcs I usually need to send off emails. I use Gmail on any of the desktops and Mail.app on the laptop. Since mac-sendai handles the social part, my address book there is where I aggregate and collate most of the information about contacts and sync both the cell phone and an ipod touch to it.</p>
<p>Up until now the only connection to the cloud was from the laptop to Plaxo, to get auto-updates for contact information of friends and "business associates". It works rather well and the best way to prove it is that most of the time I don't even notice it.</p>
<p>But lately I've noticed that OS X is able to sync remotely to google contacts, and since I use gmail on the desktops, having it synchronized with the address books is the last step in having a always available and up to date contact store on all machines, with the added benefits of remote backups (besides the time machine I store at home).</p>
<p>So nowadays here's the replication flow for my "personal network":</p>
<p style="text-align: center;"><img src="http://farm3.static.flickr.com/2473/3614574277_5abdea8026_o.png" width="385" height="378" alt="Sync network" /></p>
<ul>
<li>Dropbox handles the "utils", which are about 50 or 100 megs of portable apps including notepad2, gnu utils and Launchy's preferences, current working set documents, emacs site-lisp and .emacs. Some time ago I used foldershare for the utils, but it was too finicky, and with hard links from the dropbox to the correct places, it all works much better.</li>
<li>Gmail handles the email. I've used IMAP even before gmail on all desktop programs and now on the ipod touch, so I haven't even thought about that particular issue for a while.</li>
<li>Google Calendar keeps some of my appointments, with a shared calendar for weListen.</li>
<li>And now, Google Contacts stores the emails and phone numbers for my little social network.</li>
</ul>
<p style="text-align: left;">The migration of contacts ended up costing about half an hour of deduplication and merging, but thankfully the address book includes a shortcut to merge contacts, so most of the time it was spent cleaning up emails that I don't need and just checking the contacts to see that nothing was mangled.</p>
<p style="text-align: left;">My biggest worry now is that the address book will become bloated. GMail adds any address that you send email to to the contacts list, and most of the time if it's a one time only reply I won't want it to be replicated, so the jury's still out on how I'll handle that.</p>
<p style="text-align: left;">But for now, I'm a happy camper. No more copy pasting of emails, and my inner software engineer feels more confortable at not having duplicated information spread around.</p>
<p style="text-align: left;">Edit: thanks to <a href="http://twitter.com/edgargoncalves/status/2109859997">Edgar Gonçalves</a> for the title fix :) In my defence Starbucks had no wifi, and I was unsure of the correct title :)</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com3tag:blogger.com,1999:blog-4289590770839747775.post-8064499825198715872009-04-22T12:33:00.001+01:002009-04-22T12:33:33.461+01:00My delicious tag wordle<p>Does it show that I am a .net developer with a python deviancy?</p>
<p><img src="http://farm4.static.flickr.com/3531/3464732889_9e989f6750.jpg" width="480" height="210" alt="Delicious Tag Wordle.png" /></p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-32388750884497085542009-01-13T19:57:00.000+00:002009-01-13T19:58:23.602+00:00Typemock Isolator Plug (to get a free license and try out something other than Moq)<p><a href="http://www.typemock.com/vbpage.php?utm_source=vbp&utm_medium=typeblog&utm_campaign=isolatorvb">Programming Visual Basic</a> applications?</p> <p>Typemock have released a new version of their <a href="http://www.typemock.com/?utm_source=hp&utm_medium=typeblog&utm_campaign=isolatorvb">unit testing</a> tool, Typemock Isolator 5.2.
This version includes a new friendly <a href="http://www.typemock.com/vbpage.php?utm_source=vbp&utm_medium=typeblog&utm_campaign=isolatorvb">VB.NET </a>API which makes Isolator the best Isolation tool for <a href="http://www.typemock.com/vbpage.php?utm_source=vbp&utm_medium=typeblog&utm_campaign=isolatorvb">unit testing A Visual Basic (VB) .NET application</a>.</p> <p>Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such as <a href="http://typemock.com/sharepointpage.php?utm_source=spp&utm_medium=typeblog&utm_campaign=isolatorvb">SharePoint</a>, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, <a href="http://www.typemock.com/wcfpage.php?utm_source=wcfp&utm_medium=typeblog&utm_campaign=isolatorvb">WCF unit testing</a> and more.</p> <p>Note that the first 25 bloggers who blog this text in their blog and tell us about it, will get a <strong>Free Full Isolator license</strong> (worth $139). If you post this in a <strong>VB.NET dedicated blog</strong>, you'll get a license automatically (even if more than 25 submit) during the first week of this announcement.</p> <p>Go ahead, click the following link for <a href="http://blog.typemock.com/2009/01/get-free-isolator-licnese-for-helping.html?utm_source=vb_blog&utm_medium=typeblog&utm_campaign=isolatorvbblog">more information </a>on how to get your free license.</p>Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-38881388060074894082009-01-07T16:25:00.001+00:002009-01-07T16:25:58.770+00:00Evil Extension Method, or just handy?<p> </p> <p>I just realized I can have the following extension method:</p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> StringExtensions</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">bool</span> HasContent(<span style="color: #0000ff">this</span> <span style="color: #0000ff">string</span> self)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> <span style="color: #0000ff">return</span> !<span style="color: #0000ff">string</span>.IsNullOrEmpty(self);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> }</pre>
</div>
</div>
<p></p>
<p>And then use it like this:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> [TestFixture]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> StringExtensionMethodsTest</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> [Category(<span style="color: #006080">"Unit"</span>)]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> TestStringHasContentWorksForNullStrings()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 8:</span> <span style="color: #0000ff">string</span> s = <span style="color: #0000ff">null</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 9:</span> Assert.IsFalse(s.HasContent());</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 10:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 11:</span>  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 12:</span> [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 13:</span> [Category(<span style="color: #006080">"Unit"</span>)]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 14:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> TestStringHasContentWorksForEmptyStrings()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 15:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 16:</span> <span style="color: #0000ff">string</span> s = <span style="color: #006080">""</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 17:</span> Assert.IsFalse(s.HasContent());</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 18:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 19:</span>  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 20:</span> [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 21:</span> [Category(<span style="color: #006080">"Unit"</span>)]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 22:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> TestStringHasContentWorksForStringsWithContent()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 23:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 24:</span> <span style="color: #0000ff">string</span> s = <span style="color: #006080">"content"</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 25:</span> Assert.IsTrue(s.HasContent());</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 26:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 27:</span> }</pre>
</div>
</div>
<p>The interesting part is that a method call on a null object for an extension method works, which allows for the s.HasContent() idiom, instead of string.HasContent(s).</p>
<p>My question is the following: is relying on such “detail” good, in the way that it allows for less line noise and cleaner code, or bad for violating the idea that you can call a method on a null object and not get an exception?</p>
<p>I’d love to hear opinions on this.</p> Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-35996416218363497422008-12-07T00:47:00.001+00:002008-12-07T00:47:27.278+00:002 more apps I end up installing on all computers I use.<p><a href="http://www.foldershare.com/">Foldershare</a>, set to sync my utils folder, which includes putty, teracopy, some gnu command line utils, a couple of scripts to start and stop services, .net reflector, keepass binary, notepad2, and some other portable apps that I end up collecting over time.</p>
<p><a href="http://www.getdropbox.com/">Dropbox</a>, mostly for the public folder. The explorer/finder integration is a wonderful piece of magic. Dropping a file on the public folder and using the "Copy the public link" item on the context menu ended up being my favorite way to share files with the world.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-91947024125936560402008-11-26T01:39:00.001+00:002008-11-26T01:39:36.832+00:00First shot at a couchdb installer on windows<p>Disclaimer: this is for the brave folks who wish to try things out. So far I've only tested the installer on my own machine and on a clean Windows XP vmware image.</p>
<p>Now for the running bits: <a href="http://www.brunomlopes.com/software/couch-db-binaries">here's</a> a first try at getting a workable couchdb installer on Windows.</p>
<p>There were some instructions down at the <a href="http://wiki.apache.org/couchdb/Installing_on_Windows">wiki</a> on how to get all the bits and bobs running together, but parts of it required a C compiler and some rather tedious setup on part of the user. It was also a bit frail, as noted by me trying for a couple of afternoons to get the unit tests to pass.</p>
<p>The biggest problem was that Spidermonkey must be compiled in a specific way (one that wasn't apparent to me at first), which I dismissed at first because the blog containing <a href="http://blog.endflow.net/?p=55&lang=en">the steps</a> was down. Also, one must use lowercase paths on the config file, otherwise erlang will choke when trying to open the database files.</p>
<p>The next step would be to create a shortcut on the start menu, get some sensical text on the installer, do some error checking to find out if the prerequisites are installed, and create an uninstaller.</p>
<p>For now, here's the installer for the world to try. Leave a comment if you find a problem or have a suggestion.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com10tag:blogger.com,1999:blog-4289590770839747775.post-83840339272419983312008-10-28T23:12:00.001+00:002008-10-28T23:12:12.685+00:00Thank you guys!<p>My great friends and colleagues at weListen just offered my these two wonderful sets of DVDs for my birthday:</p>
<p><img src="http://farm4.static.flickr.com/3042/2981928025_c82df9f180.jpg" width="480" height="360" alt="birthday presents" /></p>
<p>These are Q&A sessions Kevin Smith does at packed theaters with thousands of people, and where he talks about everything and anything. It includes some inside jokes for his Askewniverse fans, and each disk is about an hour and a half of him just having fun with the audience. And that's the brilliance of it. It really is just a dude with some great stories having fun with people who dig his work, and he just goes with the flow, having people from the audience up on the stage for whatever reason it is at the time, or going on a binge discussing Prince's flamboyance.</p>
<p>For anyone who's a fan of Kevin Smith's movies, these dvds are must see. And I really thank the guys at work for the gift. :D</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0tag:blogger.com,1999:blog-4289590770839747775.post-7641823690554586562008-10-17T00:42:00.001+01:002008-10-17T00:42:36.599+01:00Unexpected change<p>Got home at 11pm. General slouch mode before bedtime engaged. Open firefox for one last news feed round and look at a large change on iGoogle.</p>
<p>My iGoogle page is "designed" to fit on one 20" screen at 1650x1050 or thereabouts. I want to open it, scan it quickly for any big news and move on. Now it takes two screens with a short description for each feed item (as most of the widgets are based on newspapers and tv channels' feeds), which kind of defeats the purpose. Also, the tabs moved to the left, which may be a good option for today's wide screens, but looks a bit odd having lots of negative space on a vertical bar.</p>
<p>Thankfully a quick trip to the tab's settings shows me a way to remove the new feed behavior and return the page to a more sane, no scroll, quick scan mode. It also shows a manual backup for the iGoogle page, and export settings. May pay someday to add these settings to the backup jobs at home.</p>
Brunohttp://www.blogger.com/profile/07207770895217924448noreply@blogger.com0