Just sharing some of my inconsequential lunch conversations with you... RSS  

Monday, July 19, 2010

Turn your laptop into a wireless Access Point

There are a couple of use scenarios where I find useful to providing wireless access from your laptop:

  • Creating a network “island” without a router;
  • Sharing internet access to other laptops where only one wired point is available;
  • Providing network and internet access to your PDA where no AP is available. My favorite usage :)

Here are a couple of tools:

Please note: at least for Virtual Router, there’s a (short) wireless network card short compatible list.

Sunday, July 18, 2010

Upgrading HTC Hero to Android 2.1

I’ve finally upgraded to Android 2.1 the HTC Hero (T-Mobile G2) I’ve been using. For the most part this is a safe process, and the chances to brick it are virtually none (if understand it correctly !…).

Here’s the guide I’ve followed: [Guide] Complete Newbie Guide to Install a Custom Rom [Updated 16/07]. And yes, I had to “Goldcard” it…

I’ve tried out a few ROMs and stopped at VanillaEclair 5.0-build7 – for no particular reason. It worked, some of the others had some flaw that I’ve encountered, I’m afraid it wasn’t a very scientific decision...

For the little I’ve tested, I’ve I liked:

  • The mail. Finally!
  • VPN and proxy support.

What I didn’t like:

  • Loosing the cool HTC apps and widget… oh well..

 

<update>

I’m afraid I couldn’t connect to my company’s VPN :(

<update>

Monday, July 05, 2010

32-bit ODBC drivers on a 64-bit machine

Today I had the need to install a 32 bit ODBC driver on my x64 Windows 7. After installing the driver, I couldn’t find it on the 32-bit ODBC administrator.

This tool only configures 32-bit native calls, for 32/64-bit environment we have to set it on %systemdrive%\Windows\System32\Odbcad32.exe. Here’s Microsoft’s support link, and here’s how to debug it on SSIS:

image

Wednesday, April 21, 2010

Microsoft Enterprise Library 5.0

It shipped! Here it is.

Here’s what’s new:

This major release of Enterprise Library contains many compelling new features and updates that will make developers more productive. There are no new blocks; instead the team focused on making the existing blocks shine, on testability, maintainability and learnability. The new features include:

  • Major architectural refactoring that provides improved testability and maintainability through full support of the dependency injection style of development
  • Dependency injection container independence (Unity ships with Enterprise Library, but you can replace Unity with a container of your choice)
  • Programmatic configuration support, including a fluent configuration interface and an XSD schema to enable IntelliSense
  • Redesign of the configuration tool to provide:
    • A more usable and intuitive look and feel
    • Extensibility improvements through meta-data driven configuration visualizations that replace the requirement to write design time code
    • A wizard framework that can help to simplify complex configuration tasks
  • Data accessors for more intuitive processing of data query results
  • Asynchronous data access support
  • Honoring validation attributes between Validation Application Block attributes and DataAnnotations
  • Integration with Windows Presentation Foundation (WPF) validation mechanisms
  • Support for complex configuration scenarios, including additive merge from multiple configuration sources and hierarchical merge
  • Optimized cache scavenging
  • Better performance when logging
  • Support for the .NET 4.0 Framework and integration with Microsoft Visual Studio 2010
  • Improvements to Unity
  • A reduction of the number of assemblies

Sunday, April 18, 2010

How to simply starve your windows forms app

I was rewriting on .NET 4 some of our internal benchmarking tools (ok, a cooler way to say I wrote a small utility to stress our components on high concurrent environments…), when I’ve deadlocked the… application itselfe!

Here’s what I’ve done:

            var tasks = Enumerable.Range(1, (int)numericUpDownNumberOfThreads.Value).Select(
i =>
{
var task = new Task(
() =>
{
Invoke(LogMessageDelegate, ">> I'm in: " + i);
Thread.Sleep(new Random().Next(1000));
Invoke(LogMessageDelegate, "<< Bye bye: " + i);
}
);
task.Start();

return task;
}
).ToArray();

Invoke(this.LogMessageDelegate, ">> WaitAll");
Task.WaitAll(tasks);
Invoke(this.LogMessageDelegate, "<< WaitAll");


The way the Invoke method works is quite simply by sending a message to the correct thread, and if there is no message pumping no one will process the message. The solution was evolving on yet another thread:


            new Task(
() =>
{
var tasks = Enumerable.Range(1, (int)numericUpDownNumberOfThreads.Value).Select(
i =>
{
var task = new Task(
() =>
{
Invoke(LogMessageDelegate, ">> I'm in: " + i);
Thread.Sleep(new Random().Next(1000));
Invoke(LogMessageDelegate, "<< Bye bye: " + i);
}
);
task.Start();

return task;
}
).ToArray();

Invoke(this.LogMessageDelegate, ">> WaitAll");
Task.WaitAll(tasks);
Invoke(this.LogMessageDelegate, "<< WaitAll");
}
).Start();

Wednesday, April 14, 2010

Reviewing a slow web application page

Once in a while I’m get called to help figuring out why are are our application running slow.

Though in the majority of cases we end up on the some tier – the database, sometime we get some surprises. This was one of this cases.

I started following a 8 seconds search page. The application had little or no instrumentation, so all I started with IIS logs:

  • 1 call to OurSearchFunction.aspx: 8 s
  • Abount 10 consecutive calls to a local GiveMeSomeRowDataWebService.asmx: totaling about 7 s

Uhm… strange, isn’t it? Looking at the code, I’ve found a datagrid that was calling a WebService for each produced row !As we only needed to get the information when the user followed a link on the grid, we move it to the corresponding event, saving around 90% on wasteful calls.

Friday, April 09, 2010

3rd General Assembly of RACE networkRFID

clip_image002[6]The 3rd General Assembly of RACE networkRFID was held at the new Frankfurt University campus on March 25th, 2010.

My company, Link, is an associated member of RACE networkRFID, a network designed to become a federating platform to the benefit of all European Stakeholders in the development, adoption and usage of RFID.

About the meeting itself you can follow the announcement at the public site. For now I’d like to make a reference to the RACE database of RFID use cases. The result of WP3, the RACE database of RFID use cases is now on-line and accessible to the members, who are strongly encouraged to connect and enter their use cases. We will soon start submitting some of the RFID we are working on, and I encourage all the readers to do the same. It’s free!

Quadro de Referência Estratégico NacionalIt was a great opportunity to share our experience and expectations over RFID, and above all to share the next generation of projects we are working on. In this respect I’ve had the opportunity to present to some of members our investment on rfrbNET project, a Track & Trace Federated Network. rfrbNet is co-financed by QREN (National Strategic Reference Framework), the framing for the application of the Community’s policy for economic and social cohesion in Portugal.

These meetings give us an opportunity to do some networking among the participants - I was naturally particularly interested on promoting rfrbNet.

And here we are:

3rd assembly

Here are some photos of our host, the new Frankfurt University campus:

IMG_9075

IMG_9064_5_6_adjust-1

Finally I had an opportunity to do a little sightseeing on Frankfurt. It’s a quite city with a curious blend of history and modernity. Here’s a dramatic (probably over photoshoped…) photo:

IMG_9104_5_tonemapped-1

Wednesday, April 07, 2010

New <%: %>Code Nugget Syntax

Tired of writing <%= Server.HtmlEncode(Model.MyString) %>? Here’s the new ASP.NET 4 way:

<%: Model.MyString %>

C programming language back at the top

According to the TIOBE index C programming language back at number 1 position. It’s no surprise that Java is loosing pace to other JVM languages. But that C is gaining traction? Uauu, I didn’t expect this…

Also worth mentioning is Apples’s Objective-C raise. And Go (go figure :)

Here Abril’s 2010 index:

Position
Apr 2010

Position
Apr 2009

Delta in Position

Programming Language

Ratings
Apr 2010

Delta
Apr 2009

Status

1

2

clip_image001

C

18.058%

+2.59%

  A

2

1

clip_image002

Java

18.051%

-1.29%

  A

3

3

clip_image003

C++

9.707%

-1.03%

  A

4

4

clip_image003[1]

PHP

9.662%

-0.23%

  A

5

5

clip_image003[2]

(Visual) Basic

6.392%

-2.70%

  A

6

7

clip_image001[1]

C#

4.435%

+0.38%

  A

7

6

clip_image002[1]

Python

4.205%

-1.88%

  A

8

9

clip_image001[2]

Perl

3.553%

+0.09%

  A

9

11

clip_image001[3]clip_image001[4]

Delphi

2.715%

+0.44%

  A

10

8

clip_image002[2]clip_image002[3]

JavaScript

2.469%

-1.21%

  A

11

42

clip_image001[5]clip_image001[6]clip_image001[7]clip_image001[8]clip_image001[9]clip_image001[10]clip_image001[11]clip_image001[12]clip_image001[13]clip_image001[14]

Objective-C

2.288%

+2.15%

  A

12

10

clip_image002[4]clip_image002[5]

Ruby

2.221%

-0.35%

  A

13

14

clip_image001[15]

SAS

0.717%

-0.07%

  A

14

12

clip_image002[6]clip_image002[7]

PL/SQL

0.710%

-0.38%

  A

15

-

clip_image001[16]clip_image001[17]clip_image001[18]clip_image001[19]clip_image001[20]clip_image001[21]clip_image001[22]clip_image001[23]clip_image001[24]clip_image001[25]

Go

0.710%

+0.71%

  A

16

15

clip_image002[8]

Pascal

0.648%

-0.07%

  B

17

17

clip_image003[3]

ABAP

0.625%

-0.03%

  B

18

20

clip_image001[26]clip_image001[27]

MATLAB

0.616%

+0.13%

  B

19

22

clip_image001[28]clip_image001[29]clip_image001[30]

ActionScript

0.545%

+0.09%

  B

20

19

clip_image002[9]

Lua

0.521%

+0.03%

  B

Here’s my 2008’s post about the index.

Development Catharsis :: Copyright 2006 Mário Romano