Sunday, December 20, 2009

Digital Magazines

Could this be the future of magazines?

Mag+ from Bonnier on Vimeo.

Thursday, October 22, 2009

The Future of Technology

My thoughts on where technology is heading:

  • More real-time information: I believe one interesting aspect of Twitter is that it has a real-time flow of information. We are a society filled with people that don’t trust the media and are discovering that we ourselves are the media. I think most people have a desire to share their brilliance and their thoughts with others. We all want a voice in an increasingly noisy world. The voices of all these people combine with professional sources are generating a large amount of data. This information is then subscribed to and viewed by people in real-time. We are coming to expect that the information that we care about flow to us in real-time. Magazines, newspapers, and even TV aren’t real-time enough. Nobody wants to wait for next month’s publication, when they can just Google for it. People don’t even want to wait for the “6 o’clock news”. There are currently efforts underway to aggregate and analyze the flow of information not just from the end user but also from the source. One day we may be able to predict or contain outbreaks of diseases and respond to disasters by simply analyzing the flow of information. Decisions may be based on what a population is doing at a given moment in time. Information is much faster and in such greater quantity that the questions we must ask ourselves are: “How will we use this real-time information?”, “How will we control this real-time information?” and “How will we analyze and make sense of it all?”
  • More consolidation: Over the years it seems that we are moving toward a more consolidated technology world. I don’t think people want to experiment with different technologies like they did in the past. Apple’s popularity can be attributed to their professional and polish look along with the idea of getting people hooked on their suite of technologies. Of course I am speaking about people that are busy professionals that are more concerned with getting things done as opposed to spending time and money to find the best way to get things done. Ultimately the best way is always changing. Furthermore, the gap isn’t very big between the best way and the good enough way. I think the abandonment of email systems in favor of sites like Facebook is about going into one site to manage a large portion of your life. More features and open platforms that allow users to have a single consistent experience is going to be key for many companies.
  • More accessibility: We are getting more and more connected devices. We have our cell phones, our TV, our computers, and even our cars. With all of these devices we want ways to access and manage our data. We should be able to view our calendars from home, from work, or from the road. With 3G, 4G, Edge and city wide WIFI we have created the 24 x 7 connected world. With this new world we want to access our data at any time and by any device. We want to view our calendars (and tasks) before we get into the office. All of this is going to require better ways to synchronize and/or access our information at all times and from all places.
  • Platform: To large degree when you ask the older generation what they think about when they hear “platform”, you will hear things like Windows, Apple, Linux, etc. However, when you ask the younger generation what they think about when they hear “platform” they may say things like Firefox, Google Chrome and Apple (Safari). The younger generation is so connected that they view the browser as the OS. I believe that this is something that will impact our world in ways that we have yet to conceive. We will use the cloud as our storage and our browsers as our client. Google is planning on the web as being the back end and the browser as being the client. I believe that they are going to take this to new heights with the Google OS, but this is only speculation because Google hasn’t released much information on what exactly is the Google OS. However, perhaps the future may prove to swing things in the opposite direction. There are attempts to get out of the browser. With technologies like Silverlight and Adobe Flex perhaps the browser will change to something else. There have also been advancements in Virtual Machines and Virtual Environments. I could see OS’s as just hosting Virtual Sandboxes that can run a wide variety of applications that we access from the web. At this point it is unclear what the future platform will be, but it is clear that it is changing to accommodate web applications.

Saturday, August 15, 2009

Willard Wigan's Microscopic Masterpieces

Willard Wigan's amazing creations. Click here to hear his story.


Thursday, June 18, 2009

Learning Assembly

A colleague of mine demonstrated a vulnerability in Adobe Acrobat Reader that exploits the way images are loaded. It is possible to send someone a PDF that once opened could download a file and run it. The details of the vulnerability aren’t important, but the process of understand how a hacker might discover such a vulnerability is quite interesting. One would have to have a good understanding of how computers work as well as how to disassemble and understand an EXE. Being a software developer I wanted to brush up on assembly. My colleague emailed me the following set of videos:

Assembly Primer for Hackers
Part 1 - System Organization
Part 2 - Virtual Memory Organization
Part 3 - GDB Usage Primer
Part 4 - Hello World
Part 5 - Data Types
Part 6 - Moving Data
Part 7 - Working with Strings
Part 8 - Unconditional Branching
Part 9 - Conditional Branching
Part 10 - Functions
Part 11 - Functions Stack

Monday, March 02, 2009

Monday, February 09, 2009

.Net Enum.Parse()

Let’s say you have the following enumerated type:

enum Rainbow
{
    Red,
    Orange,
    Yellow,
    YELLOW,
    Green,
    Blue,
    Indigo = 8,
    Violet = 8
}

You can then use Enum.Parse() method to convert a string to the enumerated value. This is demonstrated by doing the following:

Rainbow rainbowValue = (Rainbow)Enum.Parse(typeof(Rainbow), myString, true);

Where myString is a string variable that holds the string you want to convert.

When you perform Enum.Parse() you should be aware of a few things that may not be obvious.

1) String numbers can be used. For example “1” will convert to Rainbow.Orange.

2) A string number that is out of range doesn’t throw an exception. You must use Enum.IsDefined() to make sure that the number is in range. For example if you assign “100” to mystring you won’t see an exception thrown.

3) The last argument of the Enum.Parse() method allows you to ignore the case. If you do ignore the case the first value found in the enum will be used. If you plan on ignoring case then you should make sure that the values of the enum are unique ignoring case. The compiler will fail if you have enum Rainbow { Red, Red}, but will not fail if you have enum Rainbow { Red, RED}.

4) You can assign the same number to two different enum values. Surprisingly this doesn’t throw a compiler warning or error. Equally surprisingly the last number is chosen. For example if you assign “8” or “Indigo” to mystring, the enum variable will be set to Rainbow.Violet.

5) A comma separated string can work, but it is probably not what you want unless you are using the FlagsAttribute with the enum type and assigning number values in a way that can be masked. For example if you assign “Orange, Green” to mystring, the enum variable will be set to Rainbow.Blue. This is because you are actually doing Rainbow.Orange | Rainbow.Green which is actual (1 | 4) and in binary (0x0001 | 0x0100) with is 5 (0x0101).

Conclusion

If you are using Enum.Parse() to convert strings to enum variables you should keep these things in mind. Dispending on what you are doing these issues may not be a problem, or they may be hidden gotchas with unintended results.

Monday, October 20, 2008

Standard System Fonts

I have been looking into system fonts and "Windows Form Applications" in Visual Studio. You can change your OS system fonts on XP via the “Display” property dialog. In the Display” property dialog, under the “Appearance” tab, there is an “Advanced” button that will allow you to configure the system font. Furthermore, .Net has the System.Drawing.SystemFonts object that can be used to access system fonts.

clip_image002

The following table maps the fonts that can be configured via the “Advanced Appearance” dialog to the fonts that are available from System.Drawing.SystemFonts.

 

Advanced Appearance Dialog System.Drawing.SystemFonts
n/a System.Drawing.SystemFonts.DefaultFont
n/a

System.Drawing.SystemFonts.DialogFont

Active Title Bar

System.Drawing.SystemFonts.CaptionFont

Icon

System.Drawing.SystemFonts.IconTitleFont

Inactive Title Bar

System.Drawing.SystemFonts.CaptionFont

Menu

System.Drawing.SystemFonts.MenuFont

Message Box

System.Drawing.SystemFonts.MessageBoxFont

Palette Title

System.Drawing.SystemFonts.SmallCaptionFont

Selected Items

System.Drawing.SystemFonts.MenuFont

ToolTip

System.Drawing.SystemFonts.StatusFont

Important fonts in System.Drawing.SystemFonts

  1. System.Drawing.SystemFonts.DefaultFont is the default font of the operating system and it is defined in the registry at “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes\MS Shell Dlg”. It is defaulted to “Microsoft Sans Serif” and is the font that Visual Studio seems to use for Windows Form applications.
  2. System.Drawing.SystemFonts.DialogFont is defined by .Net and, as far as I can tell, it is hard coded to “Tahoma 8 pt” font for Windows 2000 and higher, otherwise the System.Drawing.SystemFonts.DefaultFont is used.
  3. System.Drawing.SystemFonts.MessageBoxFont is the default for message boxes and is also the default font for WPF Applications in Visual Studio. System.Drawing.SystemFonts.MessageBoxFont defaults to “Tahoma” on Windows XP and “Segoe UI” on Vista.

Conclusion

The default font provided is not good enough for today's professional looking applications. System.Drawing.SystemFonts.DialogFont seems to be a good choice, but doesn’t change on Vista. I believe System.Drawing.SystemFonts.MessageBoxFont should be the primary font used in Windows Form Application development.

Monday, September 01, 2008

Microsoft Certified Technology Specialist

I passed a second Microsoft certification exam. Now I'm a Microsoft Certified Technology Specialist.

Friday, August 08, 2008

Office 2007 and Fitts' Law

Whether you think Office 2007 is brilliant or if you're wondering what was Microsoft thinking, Jensen Harris’ blog has some fascinating insight into UI design. He explains Fitts’ law and how it was used in the creation of Office 2007.

Think about Word 1.0, which was designed for a common maximum 640x480 screen resolution. Toolbar buttons in Word 1.0 were 20x20 buttons with 16x16 icons in them.

Word 2003, on the other hand, is commonly run at resolutions as high as 1600x1200 and beyond--yet the toolbar buttons remain the same 20x20 size they were in Word 1.0. But because the screen is so much larger, most of the time your mouse cursor will be much farther away than it could have been on a 640x480 screen. Greater mouse distances mean an increased MT target acquisition time.

In other words, the same button takes much longer to click than it did fifteen years ago.

Tuesday, August 05, 2008

Win32 vs. WPF Performance

I created two similar applications in Visual Studio 2008, one as a Windows Forms Application and the other as a WPF Application.

Windows Forms Application (Win32) WPF Application

I then preformed the following tests (ran tests three times and recorded the average) as listed below:

  • Time it takes to open one window.
  • Time it takes to open 100 windows.
  • Time it takes to open a window with many controls.
  • Amount of memory consumed after opening the application.
  • Amount of memory consumed after launching one window.
  • Amount of memory consumed after launching 100 windows.
  • Amount of memory consumed after launching a window with many controls.
  • Amount of memory consumed after launching a Win32 open dialog (only in WPF).

Note: I only tested this on a single Windows XP machine and a single Vista machine. And I am ignoring hardware configurations.
Note: Memory was recorded from the task manager.

Windows XP – Time in seconds

 

Win32

WPF

Launch Single Window

0.0233669

0.2370075

Launch 100 Windows

1.0548501

21.5009168

Controls Window

0.3838853

0.4473099

Windows XP – Memory

 

Win32

WPF

Just Application

13,345K

19,340K

Launch Single Window

13,885K

20,867K

Launch 100 Windows

15,089K

55,685K

Controls Window

16,333K

24,859K

Launch Win32 Dialog

23,440K

Vista – Time in seconds

 

Win32

WPF

Launch Single Window

0.0170000

0.913333

Launch 100 Windows

1.1940000

12.43466667

Controls Window

0.2886667

0.4900000

Vista - Memory

 

Win32

WPF

Just Application

3,623K

11,995K

Launch Single Window

3,715K

12,595K

Launch 100 Windows

4,377K

15,715K

Controls Window

6,132K

16,241K

Launch Win32 Dialog

14,132K

Results

Windows XP

  • Unless you have a lot of controls on a window, Win32 is faster. In my test of the control window Win32 was faster, however WPF was not far behind.
  • WPF can manage a lot of controls on a form better then Win32. It is hard to show in a benchmark, but by running the applications you will notice that sizing the controls window in WFP is more responsive then Win32.
  • Launch many WPF windows is slow and consumes a lot of memory.
  • When you launch a Win32 dialog from WPF there is overhead.
  • In general WPF comes at a cost in memory and performance.

Vista

  • For the most part the story is the same. WPF comes at a cost in memory and performance.
  • It seems that WPF doesn’t consume as much memory in the 100 windows test (at least on Vista machine that I tested).
  • On my Vista machine there was a noticeable difference in appearance between WPF windows and Win32 windows. The Win32 windows looked blurry and not as clean and crisp as the WPF windows. This alone may make WPF worth it. Sure it is slower and takes up more memory but it does look nicer.
Vista Images

Click the images to see them at full size.

 Win32ControlDlg

WPFControlsDlg

Sunday, April 06, 2008

How To Make A Wi-Fi Extender

This reminds me that there are still simple solutions to high tech problems.



youTube Link

Sunday, December 09, 2007

House of Cards

Building software can be like managing a house of cards.

Maybe we should hire this guy.

Saturday, November 03, 2007

Geek-O-Lanterns

I found a link to some pumpkin carvers geeking out.

Wednesday, October 03, 2007

Windows XP + Office 2007 = 13.5 GB

I reinstall Windows XP on my Tablet PC. I noticed that it is taking up a whopping 13.5 GB. This is after installing Windows XP (Tablet Edition), Office 2007, and all of the Microsoft updates (SP2 and about 120 updates). I should also mention that I did install a few extra options for both Windows XP and Office 2007. Sure you could remove a lot of things you may not use, but I would rather not for two reasons. First, it is time consuming to have to figure out what you don’t need. And second, I like having more features at my figure tips, not less. I really done like hunting for the install disk when I discover I need some feature that wasn’t installed. However, I am a fan of compression and I did compress my drive.

Wednesday, September 19, 2007

Inside of Hard Drive

This is a interesting video on how hard drives work.

Sunday, August 26, 2007

Microsoft Certified

I passed a MCTS exam. I guess that makes me a Microsoft Certified Technology Specialist.







Microsoft Certification Exams Completed Successfully

 

Exam ID

Description

 

Date Completed

 

536

TS: Microsoft® .NET Framework 2.0 - Application Development Foundation

 

Jul 18, 2007

Saturday, July 28, 2007

My Twin

I made the mistake of telling Brett that I had a twin brother. He repeatedly asked me for a picture and when I constantly refusing to give him one. He then took matters into his own hands.

(My face on Arnold and DeVito)

Tuesday, July 24, 2007

My Screencast on Lifehacker

I created a screencast about my Windows Key + R post and submitted it to Lifehackers. Seeing something that I have done on Lifehackers is very cool. I can’t wait to read my very own copy of the Lifehacker book.

Sunday, July 22, 2007

Medieval Tech Support

I had a good laugh when I saw this. Although I tend to give users a little more credit.