Categories
Geeky/Programming

Programming Home Projects – Like Playing Nintendo?

Ever since I started programming, I have always had some crazy idea on the side that I would be working on, some project, some program I could write. A few have seen the light of day (Fat Finger Media Center, Pocketblogger, amongst others..). I was thinking tonight, and it dawned on me. Doing development projects on your own, at home, is like playing Nintendo. Why? Well I say Nintendo because that is what we did when we were 8. It is like people that call all types of soda pop “coke”, I call all video games “Nintendo”, ok so we have that down,

Doing development projects on your own, at home, is like playing Video Games.

How is like playing video games? Well, everyone who has played video games knows about it, and here is how it goes. You have this awesome game, but it is 1 player. You and your buddy can play together by switching off when you get killed, or if one guy is better than the other, then the other guy just watches, helps, looks for stuff the other guy will miss, goes and gets chips, beers, looks stuff up on the net, etc, a video game co-pilot if you will. Always have to get that Simpsons reference in there too (From the Episode: Alone Again, Natura-Diddily)

BART (playing a Christian video game while consoling Rod and Todd): Ooh, full conversion!
ROD: No, you just winged him and made him a Unitarian.
TODD (after Bart beats the first level of the video game): Can we play now?
BART: We are playing. We’re a team.
ROD AND TODD: [pause] Yay!

See, Rod and Todd are having so much fun, and so is Bart 🙂 – And also, don’t forget cooperative video games! Working together to get to the end – perfect!

image

No, seriously though, to me it is the same as doing home dev projects. When you do them yourself, it just isn’t as fun as doing them with someone else, as a team. People can bring different skills to the table, which make things better. (artistic abilities for graphics for example, is something someone else could totally bring to the table, even networking, server setup, backend stuff)

Now, if I could just find some motivated people with some extra time that want to learn how to do some cool stuff, and end up making some cool stuff in the process, all the while having fun, well, then, we would be playing, we would be a team.

BTW: I have a couple cool projects I want to work on, I have them in my head or semi-started, just need to get motivated!

Technorati tags: , , , , , , ,
Categories
Geeky/Programming

Vista, IIS7, Classic ASP, and Microsoft Access – How to Get It Working!

First, make sure ASP Classic Is Installed on Vista, good instructions here

Make sure your app is set up as a virtual directory, etc, etc.

Then, you need to set permissions and run commands and change around settings just to get anywhere. Just for kicks I made the IUSR for the directory have modify rights, but I am not sure if that did anything, oh well, I am not changing it back.

I ran the default page, and got this

An error occurred on the server when processing the URL. Please contact the system administrator

Nice huh? Well, I went and turned off Friendly HTTP Errors in IE Internet Options, that didn’t give me anymore info, so, found this:

cscript %systemdrive%inetpubadminiscriptsadsutil.vbs set w3svc/AspScriptErrorSentToBrowser true     

That will send the actual errors to the browser, ok good.

Now, getting this:

Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’

Found out you need to run 3 more commands to get this to work… ok

icacls %windir%serviceprofilesnetworkserviceAppDataLocalTemp /grant Users:(CI)(S,WD,AD,X)

icacls %windir%serviceprofilesnetworkserviceAppDataLocalTemp /grant “CREATOR OWNER”:(OI)(CI)(IO)(F)

And

%windir%system32inetsrvappcmd set config -section:applicationPools /[name=’DefaultAppPool’].processModel.loadUserProfile:false

After all that nonsense, the page/app actually worked! What a debacle…

Technorati tags: , , , , , , , , , ,
Categories
Geeky/Programming Ramblings

Temporary Vacancy at the "Roach Motel"? – Facebook + iPhone (useragent) = Your Contacts

I have read Dare O’s blog for a while now (years?), and recently it seems recently once every few weeks he mentions how Facebook keeps all your data so you can’t export it easily. Yes , it’s true. The email addresses are graphics, and they expire every so often, which sucks.

I was tooling around on my iPhone the other day, on http://iphone.facebook.com, and noticed that I could click on email addresses, they were links. This means you could write an app to get to them and scrape them.

Looks like that fun has ended as now Facebook has them as images as well on the iPhone, which stinks. They are my friends, my data, why can’t I get to it? Getting their email address would be more useful than getting their latest mood or their latest drink someone bought them on one of the Facebook apps.

Let my data be free!

Technorati tags: , ,
Categories
Geeky/Programming

Source Control At Home: Subversion (SVN/TortoiseSVN)

Today, Joel asked me what to do to get source control going at his new job since they don’t have any. He mentioned I have never blogged on SVN or TortoiseSVN at all, so , here goes 🙂

Currently I am using Team Foundation Server (TFS) – which is nice, integrates with VS2005, etc. But really it is only good if you are using VS2005, otherwise it is a pain. What if you have older Classic ASP apps, or PHP or whatever?

This is where TortoiseSVN comes in – I have used it in work scenarios, as well as at home. Easy to set up, and easy to use, and it is pretty scalable if you go bigger, sites like SourceForge now use it.

First thing, you want to download TortoiseSVN here – you can just get the SVN client, its CMD line, works, but is a PITA if you like Explorer Shell integration – use Tortoise.

Once you install TortoiseSVN, it asks you to restart, if you are lazy, just kill explorer.exe and then ctrl+alt+del, task manager, and file->run explorer.exe to get it back, basically it just needs to restart that process to add the shell integration.

Now, you want to create a repo. Right click on inside an EMPTY folder, in the whitespace – you will see some more options, SVN Checkout and TortoiseSVN, then a sub menu.

image

You want to “Create repository here…” just use the defaults and hit ok, it should tell you have a repo! I made mine

file:///C:/Users/steve.novoselac/Documents/repo

Now if you go to a different folder, and right click, TortoiseSVN->Repo Browser and put your file path in there, you can browse your repo, create folders, etc. Now, you need to import files/project, and then check them out somewhere.

The best thing to do is to go to a project folder say, MyProject, right click, TortoiseSVN->Import , put the path to your repo, a note of “Initial Import” and hit ok. Let it chunk through importing and then hit OK

You are now ready to check out and use the source controlled files. Go to a new folder, called Projects or whatever you want, just somewhere else besides where you are at, and then right click, SVN Checkout. You can browse to your repo, find the folder you imported and then checkout. It will put that in your new folder and there will be little icons on all the files, green icons, because they are good to go.

From here you can modify files, and they will have little red icons, and then you can revert or check in those changes to your source control repo.

Now, with VS2005 (and VS2003), when you build a project, the /bin and /obj directory change every time, and if you are in a team environment, the .suo (user options) file changes too all the time, You want to remove these from source control or you are always going to see a little red icon on the highest level folder. Its best practice to remove any file that changes from some outside force (another common one is in a picture directory, the Thumbs.db file for example)

I left out a lot of smaller details about checking out, checking in, etc, but it is pretty self explanatory. My advice would be to set up a test repo and fool around with it before you put any of your prized projects into it, or make a new repo once you get the hang of it. By the way this is just a “File Based” repo, you can also set up “Web Based” if you have Apace running, but who the heck would run Apace? 🙂

Technorati tags: , , , , ,
Categories
Geeky/Programming SQLServerPedia Syndication

Importing Data From Excel Gotcha – The Top 8 Row Rule

I have ran across this a couple times now, I actually had a blog post draft written up for this but never got around to finishing it, well this week I ran into the issue again, so here it is.

Importing data from Excel (using whatever – C#, VB.NET, SSIS, Access, etc) – you have data scattered throughout, and when you go to import it, some of the values are not getting read, they are just missing – empty, or not correct. Something goofy is happening and you cannot figure it out.

Excel tries to figure out the data type of a column, or if there is any data at all in a column by looking at the Top 8 Rows. It will ignore the header row. But it looks at these 8 rows and tries to be smart about it, and this can really screw you up if you are importing data.

Here is my example.

Year | Value1 | Value2
—————————–
1998 |             |   20  
1999 |             |   
2000 |             |   15
2001 |             |   20  
2002 |             |   
2003 |             |   15
2005 |             |   20  
2006 |             |   
2007 |     55     |   15

Now this might not work if you actually try it, but just bear with me for the examples sake. If you write a function in .NET to import this XLS sheet, the 55 in Value1 column will never get read. Why? Because the first 8 rows for Value1 are empty, and it thinks it is an empty column, just wacked. If you put a 0 in the 1998 row for Value1, then the 55 will get read. Since Value2 column has values in the first rows, it works just fine.

How can you get around this? Well, if you somehow read your XLS file without using the JET engine, then you are probably OK, also, you can tweak a registry setting to make excel look at more rows, say, 1000, which will usually get you by.

HKEY_LOCAL_MACHINESOFTWAREMicrosoftJet<version of jet>EnginesExcel

Where <version of jet> is usually 4.0

Change the TypeGuessRows value to something larger than 8 and then you should be good to go.

Just another Microsoft head scratchier…had me stumped for about an hour! 🙂

Technorati tags: , , , , ,
Categories
Geeky/Programming

Installing Fonts Programmatically on Windows

Working on a project, I came across the need to install a font on a machine. Now, manually, you can just right click on the font->install. Or I am pretty sure you can just copy into %windir%fonts and it then it works, but it might not be usable until you reboot, I am not a font expert here so don’t quote me, but just from what I have been reading in the forums.

Now, to install a font programmatically, you can just copy it into the folder, but what if you want it usable right away? um… Well, some people say there are some reg keys you need to run, etc. But I came across another very undocumented app that Microsoft has: fontinst.exe

You can just call this program and pass in an .inf file as parameter and it will install the font for you.

The inf file is formatted like:

[fonts]
My Font Name.TTF

now, to call it, you can run “fontinst.exe /F MyFontName.inf” (if you saved the file as MyFontName.inf)

C++ Code:

ShellExecute( NULL, “open”, C:MyPathfontinst.exe”, ” /F MyFont.inf”,C:MyPath”, SW_HIDE );

And it should install your font!

Note: I think you can do multiple fonts in one .inf file, I didn’t try it because I didn’t need to install more than one at a time, but I read on the forums and such that it is possible.

Technorati tags: , , , , ,
Categories
Geeky/Programming Product Reviews

IzyMail – Get Windows Live Hotmail on your iPhone

Since Microsoft doesn’t want to enable IMAP for Windows Live Hotmail accounts (It just started enabling POP3 for Hotmail Plus users), getting your Windows Live Mail on your iPhone just doesn’t work. This really stinks if it is your main email address. GMail on the iPhone stinks because of the threaded conversations – every time you send a message, you get a new one in your inbox – ugh!

Yahoo has IMAP which is good, I just don’t use it for my email. I actually use Windows Live Custom domains and use my @stevienova.com address with Windows Live Hotmail, which is really cool.

Now, the solution I am using is IzyMail – and it works. I tried quick to set it up on the iPhone itself, and it didn’t work, but there are instructions on how to set it up if you have a Mac – which I just so happen to have. I assume if you setup and Outlook account on Windows using IMAP and sync those settings it will work too. I paid the 18 dollars for the premium subscription, and it is worth it. My email now syncs to my iPhone, and all the folders. If I move a email from the inbox to a subfolder, it moves it on the server. Now, my iPhone mimics my Windows Mobile smartphone using Windows Live HTTP (DeltaSync) email syncing (as opposed to IMAP or POP3)

Please Microsoft – open up IMAP – as even a paid option! Or, on the flipside – Apple – allow HTTP mail on Mac’s and iPhones!! Getting your email from the web to a device SHOULD NOT be this complicated!!! Maybe in like 1995, but not in 2007!

Now, just have to figure out a way to get my contacts sync’d up OTA and the phone will actually be somewhat useable!

Technorati tags: , , , , , , , , , ,
Categories
Geeky/Programming SQLServerPedia Syndication

SQL Server 2005 – UNPIVOT

The other day, working on something crazy, I came across a use for the new UNPIVOT keyword in SQL Server 2005. Now, I figured I would use PIVOT before UNPIVOT, but so it goes.

Basically I had a temp table I populated that had some columns, then columns numbered 1-10 with different values. But I needed them to be row based, not column based. I could write some crazy union’s or something, but I figured, it was set up like a pivot table, so why not try UNPIVOT.

SELECT  
    MyId,
    MyName AS ‘Name’,
    tblPivot.Property AS ‘MyProperty’,   
    tblPivot.Value AS ‘MyValue’
INTO #tmp_values
FROM  
  (SELECT MyId, MyName,
CONVERT(sql_variant,[1]) AS [1],
CONVERT(sql_variant,[2]) AS [2],
CONVERT(sql_variant,[3]) AS [3],
CONVERT(sql_variant,[4]) AS [4],
CONVERT(sql_variant,[5]) AS [5],
CONVERT(sql_variant,[6]) AS [6],
CONVERT(sql_variant,[7]) AS [7],
CONVERT(sql_variant,[8]) AS [8],
CONVERT(sql_variant,[9]) AS [9],
CONVERT(sql_variant,[10]) AS [10]
   FROM dbo.MyTable
  UNPIVOT (
    Value For Property In (
    [1],[2],[3],[4],[5],
    [6],[7],[8],[9],[10])
    ) as tblPivot

you can see, you have to make sure all of the fields are the same data type, basically you can get them from being columns to being back to rows with columns Property (would be like 1-10) and then the Value would be the value in the field. Pretty nice and slick!

Technorati tags: , ,
Categories
Geeky/Programming Life Random

It's all in the family… My Uncle Matt is a MS Access to SQL Server Conversion Expert!

Last weekend I went out to Florida to visit my Aunt Jen and Uncle Matt, I have never been to Florida so this was cool. I knew that Matt had www.palmbeachdatabase.com – I took a look at the site a couple years ago but never really dug into it. Turns out he is like one of the best MS Access to SQL Server Converters around. Now, don’t get me wrong – Microsoft Access stinks – but more for a database than for a front end. Using SQL 2000/2005 as a backend and Access as a front end isn’t TOO bad, really VB 6.0’ish. I would rather see ASP.NET Front ends, but it really depends on what companies want.

It was cool to have someone in the family I can relate to! Since currently I am working on Data Warehousing and SQL Server 2005 stuff, this was cool that we could “geek talk”!

Technorati tags: , , , , , , , , ,
Categories
Geeky/Programming Life Product Reviews

iPhone Woes! Syncing Contacts

Whew, finally got my contacts onto my iPhone. How?

I use Windows Live Custom Domains, which then I use Windows Live Mail. As you would think, none of this is supported on the iPhone in any way shape or form. There is no “over the air” sync of contacts either. Blah.

So, I cleared out my Plaxo contacts, synced that up with Windows Live Mail. Good. Then, cleared by Yahoo contacts, synced that up with Plaxo, good. Then in iTunes, set my contacts to sync with my Yahoo Address Book, then manual sync to the phone. Finally have my contacts! Although, its a manual process! Yuck!

On the T-Mobile Dash (or any Windows Mobile 6.0 Device) – you can sync directly with Exchange, or Windows Live Mail – OVER THE AIR!! And if that fails, you can sync with your Outlook Address Book manually. Also, there are 3rd party apps that will sync your contacts on your device with pretty much anything. So far I haven’t found anything for the iPhone, well I am guessing because there are no 3rd Party Apps! I haven’t dug too much into the hacked apps to see if there is anything yet.

Next – syncing my Windows Live Mail – I am not sure if this is even going to be possible!

Side Note: one thing that irks me on the iPhone is it takes two steps to get to contacts, and another to see their info. Would be nice if there was a main screen icon for “Contacts”

Update: I found this http://theliveforums.com/index.php?autocom=ibwiki&cmd=article&id=1  which I am doing now instead. The ITunes to Yahoo Address book sync is really flaky, it only worked once for me. And, which really is a pain, if I add a contact in Windows Live, I have to wait for it to sync to Plaxo then Yahoo, then Sync manually. Using the method at the live forums, I can sync my Windows Contacts directly from Vista. Much easier. Still work be nice to sync OTA though!

Technorati tags: , , , , , , , , , , , , ,