Archive for March 2010

## K-3D 0.8.0.0 is not yet released but it is now compiling and working on FreeBSD 8

K-3D 0.8.0.0 is not yet released but it is now compiling and working on FreeBSD 8…I hope to help update the port as soon as the final source is released.

The developers at K-3D are great. So I have been working with the developers at K-3D to get things working well for FreeBSD 8 on their new version. They have been patient and willing to work with me. There have been some bumps, but it is now working pretty well.

Anybody who is working in 3D animation should check out K-3D. If you are looking for a free 3D animation program, it doesn’t get better. I tried other open source 3D applications and didn’t find them any where near as easy to use nor anywhere near as intuitive. I also have it running on Windows 7.

One of the coolest features about K-3D is the ability to have a scripted tutorial. It is not just a video, it actually moves your mouse and really demonstrates using the application. Go to Help and select Tutorials and choose the “Creating a mug” tutorial and watch it move your mouse and really create a 3D mug.

If you have used or maybe after you read this post you decide to use K-3D, then take a moment and either buy some swag from them or donate a few bucks to them.

You can find a small gallery here: http://www.k-3d.org/wiki/Still_Gallery.

## A snippet for handling each native type in C# and Visual Studio…when generics won't work.

So sometimes you have to have a function that can do something to any native type.

Below are two snippets to speed up the coding for you.

Ok, so of course there are times when you can use Generics.

public class myclass<T>
{
myclass(T inT)
{
}
}

However, there are functions that don’t work with a generic type T.

public class myclass<T>
{
myclass(T inT1, T inT2)
{
if (inT1 < inT2)
{
// do something
}
}
}

This results in an error: Error 1 Operator ‘<' cannot be applied to operands of type 'T' and 'T'.

Maybe you need to handle all the native data types. So it is annoying to type them in, so I created an iftype snippet.

Create a file called iftype.snippet in this directory: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C#\
Copy in this source and save the file.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Title>iftype</Title>
<Shortcut>iftype</Shortcut>
<Description>Code snippet for an automatically implemented an ‘if’ statement for each native type.</Description>
<Author>Jared Barneck</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Snippet>
<Declarations>
<Literal>
<ID>varName</ID>
<ToolTip>Variable name</ToolTip>
<Default>t</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[
if ($varName$.Equals(typeof(bool)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Byte)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Char)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(DateTime)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Decimal)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Double)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Int16)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Int32)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Int64)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(SByte)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(Single)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(String)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(TimeSpan)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(UInt16)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(UInt32)))
{
throw new NotImplementedException();
}
else if ($varName$.Equals(typeof(UInt64)))
{
throw new NotImplementedException();
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>

However, you prefer a switch statement to an if statement. Here is the same thing using the switch statement.

Create a file called switchtype.snippet in this directory: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C#\
Copy in this source and save the file.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Title>switchtype</Title>
<Shortcut>switchtype</Shortcut>
<Description>Code snippet for an automatically implemented a switch statement for each native type.</Description>
<Author>Jared Barneck</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Snippet>a
<Declarations>
<Literal>
<ID>varName</ID>
<ToolTip>Variable name</ToolTip>
<Default>varName</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[
Type t = $varName$;
switch (t.ToString())
{
case "System.Boolean":
throw new NotImplementedException();
break;
case "System.Byte":
throw new NotImplementedException();
break;
case "System.Char":
throw new NotImplementedException();
break;
case "System.DateTime":
throw new NotImplementedException();
break;
case "System.Decimal":
throw new NotImplementedException();
break;
case "System.Double":
throw new NotImplementedException();
break;
case "System.Int16":
throw new NotImplementedException();
break;
case "System.Int32":
throw new NotImplementedException();
break;
case "System.Int64":
throw new NotImplementedException();
break;
case "System.SByte":
throw new NotImplementedException();
break;
case "System.Single":
throw new NotImplementedException();
break;
case "System.String":
throw new NotImplementedException();
break;
case "System.TimeSpan":
throw new NotImplementedException();
break;
case "System.UInt16":
throw new NotImplementedException();
break;
case "System.UInt32":
throw new NotImplementedException();
break;
case "System.UInt64":
throw new NotImplementedException();
break;
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>

## My source uses subversion and has a .svn directory in each subdirectory, how do I remove those .svn directories in Windows?

My source uses subversion and has a .svn directory in each subdirectory, how do I remove those .svn directories?

Method 1 – Exporting with TortoiseSVN
Well, if you are in windows with Tortoise SVN installed, you can right-click on the folder or inside the folder in white space and choose TortoiseSVN | Export. This allows you to select a folder and export your code without the .svn folders.

Method 2 – Scripted deletion
However, if you don’t have a Tortoise SVN Client but you have all those .svn folders, you can easily delete them by a simple one line command from the windows command prompt:

c:\path\to\source> for /F “tokens=*” %A in (‘dir /S /B /AD *.svn’) DO rmdir /S /Q “%A”

## Windows 7 speech recognition

Today I am writing this post using windows seven speech recognition.

I turned on windows speech recognition and found a surprisingly working well at times.

You must speak very clearly and be prepared to make a lot of corrections.

To turn on Windows 7 speech recognition, go to Start | All Programs | Accessories | Ease of access | Windows Speech recognition.

Say “Press pipe” to insert a pipe symbol.

…using the keyboard now…
I couldn’t quite finish it using just audio. I struggled selecting the Categories…everything else I was able to do. It is quite difficult and takes a lot of practice and a lot of corrections, but I have to say that I am impressed. However, as impressed as I am, it is a long way from being faster that a keyboard for me. Of course, I have about 20 to 25+ years experience typing and I don’t remember when I started to use a mouse, but only a short few hours of voice, so maybe if I gave this voice thing 25 years I would be just as good…

## How to move a window that is off the screen in Windows 7?

Ok, so I had a window that was off the screen when I opened it. This is really annoying and easy to fix, but not obvious to fix. In fact, I didn’t find it, my manager Beau found it and showed me.

In the past version of windows, you could find the application on the start bar and right-click and choose move. However, in Windows 7, you cannot do this exactly the same way, though it is close to the same.

For example, Notepad++ opened off the screen for me one day. I right-clicked on the icon for Notepad++ in the start bar, but there was not a move option.

Method 1 – Right-click on the mini square representation of your window
So, what you have to do is really easy, though not exactly intuitive. Instead of right-clicking on the icon, just let your cursor hover over it until the small square representation of the window appears. Then right-click in the small square to find the move option.

Select the move option and you can now use the arrows or the mouse cursor to move the window back onto your screen.

Note: If the window is minimized the move option is grayed out, so make sure the window is not minimized.

Method 2 – Shift + Right-click on the Icon (Only works if only one instance is open)
If you only have one instance of the application running, you can also use Shift + Right-click.

However, if you have two instances of the application running, this method doesn’t work for you, but gives you a different list of options, which I didn’t screen shot but here are the options:

Show windows stacked
Show windows side by side
Restore all windows
Minimize all windows
Close all windows

I found the Shift + Right-Click method here:

Now that I think about this it makes sense, because the icons on the task bar have a one to many relationship with the instances of the application they are running, while the pop up boxes have a one to one relationship.

## Move over 3G phones, 4G is coming! For some, it is already here.

3G
Many people have jumped to buy smart phones but as of yet I am not one of them. The iPhone, the HTC with Google’s Android, the Blackberry Storm, all are smart phones using 3G technology now. In fact there are few phones purchased these days that don’t have 3g capability.

According to Wikipedia, here are some interesting bits of information about 3G

The first pre-commercial 3G network was launched by NTT DoCoMo in Japan branded FOMA, in May 2001…

By June 2007 the 200 millionth 3G subscriber had been connected….

So yes, many people have moved and are going to move to 3G.

Why I don’t have a 3G phone yet

1. While 3G is nice, it is too slow to meet my needs. I have wireless internet access at my house, and at my work and rarely have a need for internet while driving my 10 minute commute to and from work.
2. It is too slow for serious browsing and downloading (which I do a lot of) and nowhere near fast enough to use when gaming online (which I don’t do a lot of).
3. The phone companies charge way to much for this poor performing internet access. It costs more than my much faster and much more reliable home internet access.

So when will I move to internet access on my phone?
When my phone can replace my home internet access, I will move to wireless internet on my phone. Imagine having a laptop without an AIR Card, yet having internet access where-ever I am. Whether I am home, away, at a hotel. In fact, such a feature could change the industry in that places like a hotels and coffee shops no longer need to be “hot spots” because everyone’s phone is their own “hot spot”.

Well, 3G made the “personal hot spot” a possibility though it cannot deliver this itself, the next generation, 4G, will come closer. However, it has taken the better part of this decade to get a point where 3G is the norm. How many years will it take until 4G is the norm?

4G
4G has some strong requirements according to Wikipedia:

The 4G working group…has defined the following as objectives of the 4G wireless communication standard:

* Flexible channel bandwidth, between 5 and 20 MHz, optionally up to 40 MHz.[2]
* A nominal data rate of 100 Mbit/s while the client physically moves at high speeds relative to the station, and 1 Gbit/s while client and station are in relatively fixed positions as defined by the ITU-R,[6]
* A data rate of at least 100 Mbit/s between any two points in the world,[6]
* Peak link spectral efficiency of 15 bit/s/Hz in the downlink, and 6.75 bit/s/Hz in the uplink (meaning that 1000 Mbit/s in the downlink should be possible over less than 67 MHz bandwidth)
* System spectral efficiency of up to 3 bit/s/Hz/cell in the downlink and 2.25 bit/s/Hz/cell for indoor usage.[2]
* Smooth handoff across heterogeneous networks,[7]
* Seamless connectivity and global roaming across multiple networks,[8]
* High quality of service for next generation multimedia support (real time audio, high speed data, HDTV video content, mobile TV, etc)[8]
* Interoperability with existing wireless standards,[9] and
* An all IP, packet switched network.[8]

At 100 MBit, 4G can replace my home internet access.

However, according to this article, 4G might not really be there: AT&T, Verizon and Sprint 4G: Not so fast

Where is 4G available
I didn’t take to much time to look at all the carriers, but 4G is available in some cities already through Sprint.
http://now.sprint.com/nownetwork/4G/

This is a flash web site and you have to let it load, then click near the bottom where it says 4G cities.

Baltimore, Chicago, Seattle, Denver, Boise, Austin, and many others already have it.
Houston, San Francisco, DC, New York are others are on the list to be getting it soon.
Alas, Salt Lake City was on neither list.

I could not find if this was true 4G or if it was not. According to Wikipedia,

The pre-4G technology 3GPP Long Term Evolution (LTE) is often branded “4G”

So is Sprint’s service really 4G or is it only a mis-branded pre-4G technology?

AT&T announced that its 4G network won’t be available until 2011 and I am not sure which cities it will roll out first.

What are the market repercussions of 4G?
Well, I already mentioned one. Many of the common “hot spots” will no longer need to exist.

However, that is not where the repercussions end. The biggest repercussions are to companies that provide DSL or Cable internet, or more generally, wired internet. They will suffer the same way that land lines have suffered: the user base will decline. Why would I pay for internet access for my house if I have fast internet access through my phone that my computer can leverage. There are still reasons for home internet access, such as families that need access to the internet when a 4G phone is not home. But when both parents and one or more kids have 4G phones, that might not be the case. There will almost always be internet around. So companies like Comcast or Cox could see a slow decline in users.

However, this is not going to happen for at least a decade, because first, 4G has to deliver on it’s promised speed, or we have to wait for it’s successor. Then 4G or its successor has to become the norm. And then it will take users a few years to get used to not using home internet access. So don’t sell your stock in wired internet companies yet.

Untapped Markets

1. Docking Stations for phones – A computer docking station for the phone. Lets face, most people use a computer for email and browsing the internet and occasionally writing documents. If you had a docking station for an iPhone or an HTC, it would sell. However, I am not sure that the iPhone or the HTC could handle the video display yet, even if the docking station had an on board video card. This technologies is years away.

A similar feature would be a laptop like apparatus that wasn’t a computer but just an LCD and keyboard that is run by your smart phone, but it drastically cheaper than a laptop, it might sell.

Though this wouldn’t be for a gamer but the average home and small business user would adopt such a low cost solution to email and internet access, which is the most common user type. Using cloud tools such as Salesforce as a CRM and Google docs instead of MS Office are already happening todya and since a phone is powerful enough to use these applications, a phone-based docking station might meet many employee’s business needs today. Take away the license costs for Windows and Office, take away the help desk and IT costs of managing such windows-based PCs and a phone with a docking station that replaces a computer becomes an extremely attractive option.

1. Cloud Computing for phones – Those jumping on the cloud computing bandwagon have in my opinion made a big mistake in thinking that its market is for the home computer and the Operating System. The market is for remote applications.

The remote applications market is perfect for the future phones and future docking stations that replace the computer completely for some users. The apps and processing are offloaded to a web server somewhere in the could, so a device as simple as a phone doesn’t have to be in charge of the space required or the processing power for apps.

2. Cloud Gaming Market – Not all users replace their home computers. The PC gaming market wouldn’t touch such a device until it was powerful enough to play today’s best games, which require some of the best computers and best video cards. However, PC gaming is in the decline as gaming systems have become more and more like computers themselves.

You may think there that are already online games both simple and complex: simple, such as flash games; complex, such as World of Warcraft. Flash games require flash to be installed on the client, and a lot of processing occurs on the client. World of Warcraft has a very large installer and doesn’t completely run on the cloud, it is very resource intensive to the local computer. If a game ran completely on the cloud and all a gaming device had to do was display and pass input, a future generation of the smart phone could handle such a game.

## A Small Car Revolution…I would drive one today if they existed and were priced right…but they aren't

Small Cars
Ok, so I have been saying that I have a short 10 minute commute on 45 MPH to 25 MPH roads. I rarely have more than one other person in my car. I need a car that is about 1/3 the size of a regular car. Something that will get me to work and back. I have a Hyundai Tuscon as a family car and would use it for family travel, but it is baffling to me that people commute with full-size expensive cars. I drove a four door dodge neon for the better part of a decade and it was nice to have a small car for commuting.

A commuting revolution is necessary and like it or not, it has begun. I don’t want anything like government enforcement of this, but I think that commuters should have smaller cars with better gas mileage or electric cars. But unlike the not-so-smart Smart car, it shouldn’t cost the same as a regular car, and get the gas mileage of a regular car, but should be about $5k-8K tops. I am completely happy with this upcoming small car revolution. However, I am afraid that the prices are going to be way to high for a while. It will take time for the market and competition to demand lower prices. Lets also talk about space. How easy is it to park with a small car? How much easier is it to change lanes? How about being able to fit between other cars and the curb so you can turn right when everyone is stopped for a red. And garage space…If you get a smaller car, you suddenly have more storage space in your garage and you might be able to fit shelves on the garage wall and still be able to open your door. Affordable Small Cars I have to argue that the term “affordable” does not really fit many of these cars, but I guess it is all the opinion of the buyer. Also, the term small is used loosely as some are not really that small. http://usnews.rankingsandreviews.com/cars-trucks/rankings/Affordable-Small-Cars/ I looked through these and only two had MSRPs starting below 10,000 that are even close to what I would term “affordable”. Nissan #12 – 2010 Nissan Versa Avg. Paid:$10,272 – $16,607 MSRP:$9,900 – $16,530 Hyundai Compare the Hyundai Accent’s average paid to the smart car’s average paid:$10,189 – $16,894. #19 – 2010 Hyundai Accent Avg. Paid:$10,189 – $16,894 MSRP:$9,970 – $16,995 Toyota However, it is interesting to note that they have higher average prices paid than they Toyota Yaris # 26 – Toyota Yaris Avg. Paid:$12,798 – $14,366 MSRP:$12,605 – $14,165 Smart Car I would totally by a smart car except there cars a overprices by more than 5K and in some cases they are overpriced by more than 10K. According to this site, they average paid is$12,624 – \$21,126.
http://usnews.rankingsandreviews.com/cars-trucks/Smart_ForTwo/

Look check out how much people are asking for used smart cars that are approximately 3 years old on Autotrader in my area:
Smart Cars on Autotrader near Salt Lake

Ok, over 20K used? Over 15K if used for a few years? You have to be kidding me with this. I can get Honda Civic Hybrids or Toyota Yaris cheaper, not to mention the Chevy Aveo and other small cars that I can get for 6K-8K if they are three years old.

General Motors (GM)
GM has a car coming next year called the Spark.
http://blogs.motortrend.com/6458234/car-news/2011-chevrolet-spark-gm-thinks-small-very-small/index.html

Well, GM at least has the size almost right, though it is more like 1/2 the size not 1/3 the seize. Also I am sure the price will never meet my requirements.

GM does foresee a future car that is even smaller, yes 1/3 the size.
http://www.scientificamerican.com/article.cfm?id=gm-electric-networked-vehicle

The EN-V relies on dynamic stabilization technology similar to that of the one-person Segway scooter to keep its balance, and can be operated autonomously or under manual control. In autonomous mode the EN-V is designed to use high-speed wireless connectivity and GPS navigation to automatically select the fastest route, based on real-time traffic conditions gleaned from the Web or some other networked source of traffic information.

I can’t say much since it doesn’t really exist in the market yet. But it looks cool.

Ford
For is trying to get into the small car action too.
http://www.caranddriver.com/news/car/08q3/ford_to_sell_six_european_small_cars_in_u.s._in_2010-car_news

The Fiesta also coming out next year and is almost as a small as GMs upcoming Spark.
http://www.fordvehicles.com/cars/fiesta/

Where is the small car revolution going to take us? I don’t know for sure, but I like where it is going for the most part.

## How to make Apache handle. asp and .aspx links in FreeBSD or Linux? (Updated)

Ok, so what do you do when a site that was based on asp.net is converted to a Linux box and your product shipped with links to sites such as http://our.home.page/index.asp and many other .asp or aspx sites?

Should you use mono?
Yes, probably

See my mono post on Asp.Net here:

Asp.Net web services on FreeBSD and Apache using Mono

Should you migrate your code to php or ruby or another open source language?
Sure, maybe

If you choose not to go with mono at this point because it might be easy to re-write your code in php or ruby or any other open source language, especially if you are doing nothing more than echoing html code after performing simple calculations.

I haven’t tested it yet, but you may get a lot of the asp code automatically converted using this tool: asp2php

What about the fact that unchangeable links to my pages end with .asp or .aspx entensions?
It doesn’t matter what the file extension is, you can have that file extension handled by any scripting language. For example, to configure Apache to have php handle .asp or aspx file, you can follow the steps below.

If you have an index.asp file that should automatically be served by default, it is probably not in the list of files to serve by default, which is probably just index.htm and index.php. You can either rename index.asp to index.php or modify the httpd.conf to include the index.asp file. These steps assume you are changing the httpd.conf.

1. Change to the apache configuration directory: /usr/local/etc/apache22/
2. Edit the httpd.conf with ee.
ee httpd.conf
3. Search for “DirectoryIndex” to find the section where the directory index is configured.
4. Add index.asp as the first item as shown:
DirectoryIndex index.asp index.php index.html
5. Change to the “Includes” directory which by default is here: /usr/local/etc/apache22/Includes
6. Create a file that is named ending in .conf (For example, to show what the file does in the name, I used asp-as-php5.conf):
# Handle .asp and .aspx with php
7. Restart apache. Now your .asp and .aspx files will be handled by php.

## Sorry Opera 10.51, though you're a fast browser, I had to get rid of you fast: (Part 2)

Opera, you had promise. I tested you out and you did seem a little faster. I used you all day long.

For the first half of they everything went smooth.

• I loved the zoom feature, and if other browsers have it, it is not as obvious. I liked how every element zoomed. It wasn’t just the text that got bigger, everything got bigger.
• The speed dial feature is nice.

But then things went downhill fast.

• Opera didn’t work with the forum software my company uses. This was a deal breaker in itself, but we are upgrading in a few weeks and the browser should work in the new version.
• Then I tried to download the Voice interface and it just says failed and won’t tell me why.
• I tried to make my book marks toolbar and it wasn’t as easy as I would have liked. I still don’t have one made.
• My brother called and needed me to connect to his computer remotely, but the remote control is initiated at a web page, which didn’t work with Opera, but worked with IE or Firefox. I used IE.
• Don’t ask me why I checked this site today (I am not really a Trekky) but www.startrek.com didn’t work. Then I closed and opened the browser and it started working…that is just odd.
• I could have surpassed and forgotten about these issues with something like IE Tab. I found one but no easy installer, and I am not up for research and tweaking for this review. The lack of an easy install for this feature was the final straw.

Opera has been around a long time, and I am quite surprised that it didn’t work out for me for even a full day.

## Not Firefox, Chrome, or IE: Its Opera's new 10.51 release that boasts being the fastest browser on earth (Part 1)

Not Firefox, Chrome, or IE: Its Opera’s new 10.51 boasts being the fastest browser on earth

Opera 10.50, released a few weeks ago? It’s the fastest browser on the chart. It’s faster even than prerelease versions of Firefox and Chrome, not to mention faster than the public IE9 Platform Preview build

I tried it personally today and I have to say that there were times when it did feel faster to me. But there is a lot of testing to do before I can decide whether to make the jump to using Opera as my primary browser.

Opera only has a 2.35 percent of the market share.

To me there are pros and cons to Opera based on the details above:

Pros

• Lower market share means it is less likely to be a target for hackers as they usually target larger distributions.
• It is the fastest browser.

Cons

• Sites are probably not testing their browsers on Opera.
• Less users could mean less reported issues, less features, less plugin development, etc…

I am going to use Opera for the next week or two as my primary browser and I will post a second review about Opera. I will update this post with a link to it. This article will discuss whether Opera will remain my primary browser and if so, why? If not, why not?

Update: It wasn’t weeks, it was a day: Sorry Opera 10.51, though you’re a fast browser, I had to get rid of you fast: (Part 2)