Category Archives: Programming

To Set Sail or Not

So I am getting the programming bug again big time… I’ve had it for nearly a year now. It’s always been a higher level interest of mine. I’ve long wanted to be a game programmer… ever since the early 80s and it really took off in the mid 80s when we finally had a home computer, an IBM PCjr. I remember collecting Compute Magazine, which had full programs you could program in the computer… they gave you the full source code that you had to type in, and entering the code in and then tracking down errors, which universally meant typing errors then… but it was fun. I learned a little IBM Basica… which I think I did on my Tandy PC… I made a couple programs, or more like, modifications of programs from those in the magazines back in those days. But I never learned enough to do anything complex from the ground up.

In college, for whatever reasons, I skipped computer courses and steered to other directions, but at Brown Mackie, I did eventually move to get a Programming and Applications degree. The problem of course, was Brown Mackie’s format, and lowering to the lowest common denominator. So you had one month to each class, but if the slowest people couldn’t go along, then the whole class seemed to stall out, and we just never got far into our programming lessons. I wouldn’t feel comfortable searching out a job as a programmer based on what I learned there… heck, I could teach most, if not all the computer related classes I took there just as well if not better than we learned them. This isn’t to say I didn’t have some really good teachers, but they were held back by the text the school used, the slowest students and the format.

Anyhow, time goes on. I teach myself a bit more Visual Basic, some C# and enough PHP to fix a few issues off and on with the blog. I goof around with them some, but then stop around 2006. More time goes on and around 2008 I start looking at the idea of mobile development. iOS development looks to be out as it comes with a few obstacles, a new language or two (Objective C and possibly some COCOA), but the bigger issue would be needing a Mac, which is a rather large investment, plus in 2008 I had more faith in Android. Come 2010 I start looking at the market again, and the job options look good, and I start thinking again about my future as a programmer, and again focus on mobile development. I start really looking at the options, start thinking about focusing on Java (for Android) and iOS.. By 2011 I start looking at Full Sail University Mobile Development program which would give me a Bachelor of Science degree… now a year later I am again considering it.

The problem is a few fold… First I was really burned by Brown Mackie and how they were a rip off, and fear the same thing. Continue reading To Set Sail or Not

New Programming Adventures

I haven’t blogged about programming since 2009… It’s not for a lack of wanting to program. I do enjoy it, but I haven’t done anything for a very long time… I got discouraged because of Brown Mackie College, having a degree that is fairly worthless…
I still want to improve my C# skills…
But things seem to be heading well for mobile development. Between Android and iOS… The problem with Android is fragmentation, and support issues do to that. The problem with iOS development is you need a Mac, which I don’t have yet… and of course I’ve never learned anything with Objective C… though I think I could transition my C# lessons to Objective C to a degree… I at least have a basic familiarity with some C style syntax anyhow… The question is how to go about it… Learning on my own is a little difficult, and hard to hold your own feet to the fire as much as a being in a class will do…
Nobody locally teaches mobile development, or even Mac development… heck even C/C++ is very limited… online is the only real option, the question becomes is $60k more in school loans worth it? What are the chances of getting a good job to pay off nearly $85k in school loans having an online degree?

A MySpace, Facebook Application for the Google Android Phone

I talked how I was wanting to learn Java, so I could start making programs for the Android mobile phone platform.
A project that I thought of, but is perhaps beyond my ability for any time soon, is an application that will tie in with MySpace, Facebook and expendable to other social network websites.
Basically, it searches your friends lists, and if they have an Android phone as well and the location tracking feature turned on, you can see which of your MySpace/Facebook friends are nearby by using the Android’s built in GPS. There are variants I saw of this out there, but none I know tie in directly with the current social network, rather they setup their own networks.
Bes I can figure it, each user who has an Android device, sets up an application on their MySpace/Facebook page that detects when they enable the location feature on their Android. For privacy reasons, all it shows on the webpage itself is that location tracking is on. The back end of the application that the Friends can’t see, but the user can, allows them to block certain friends, or allow only certain friends to see their location.
If two friends have their location tacking enabled, then when they look at the application on their Android, it shows where they are via Google Maps. You can see in an instant if your friends are running late to meet you at the movie theater, or see when a friend arrives in town and a host of other cool features.
At the same time, there are the normal security concerns if some pervert is using a fake MySpace account to find young girls or something like that. I haven’t figured a way around that, but in all honesty I don’t know as if one does need to, since if they already got friended, they are already in, and as I said, the back end allows you to add only select friends to the location tracking, so hopefully that added level of security will be enough. Still the end user license would need to be written in a way so that the developer would assume no responsibility for abuse of the system. Personally, I would add a warning when they add friends to the location tracking that reminds them to be extra careful of whom they allow to track their location (this would be a dialog box that pops up each time, but would probably have a check mark so you could avoid the message next time). By default, it wouldn’t have any friends listed in the allow column.
Anyhow, that is the basics of it. I have more details floating around in my head.
Some of the variations out there currently (well, currently may not be the right word since Android itself isn’t out yet, but these are the ones that I know of in active development) that I know of:
Continue reading A MySpace, Facebook Application for the Google Android Phone

Learning Java

There is a phone platform coming out called Android, which is a project of the Open Handset Alliance. A number phone manufacturers are going to be making mobile phones based on the Open Handset Alliance specification, all of which use Android. To program for Android, you need to know Java, and so I am starting on a path of learning Java. I chose C# over Java eons ago as I was mostly interested in Windows programming, so Java’s ability to compile on one machine and run on many others, even if they weren’t Windows machines, be they Linux, Mac or whatever, wasn’t a concern. Most mobile phones use Java for their games and applications. Apple’s iPhone is cool, but to program for it, you have to have a Mac, so no programming for the iPhone. Plus the iPhone’s market is limited right now do to the exclusive AT&T deal (you can unlock the phone and run it on T-Mobile for example, but most people won’t go through that much trouble). nVidia has a chipset coming out, but for the moment, none of the Tegra based phones are for Android, but Windows Mobile based phones (and other handheld devices). nVidia is a member of the Open Handset Alliance, so they may support somebody making a Tegra based phone that conforms to the Open Handset Alliance and Android. This will be cool since they seem to have the best graphics of the phones.
There are a couple of caveats however as I embark on learning Java. First, while most Java programs can be ran on many platforms, this doesn’t seem to be the case with Android’s implementation. While the language itself is the same, you can’t compile a program that will run on both Android and say a Windows machine, another cell phone, or something like that, and vica-versa. The problem is they apparently use a different virtual machine to run on than all other implementations. They did this so it would run better on a mobile platform as I understand it. It isn’t clear to me, but it looks like since the language is the same, you could do two compiles, one for Android and one for everything else, but I may be wrong on that part… of course if you use Android specific APIs, then it won’t work on anything else.
Anyhow, I am presently staring on reading Head First Java, 2nd Edition (I am just borrowing that copy, so I don’t have a good hardcopy of my own yet…). Early into the first chapter we do an exercise where we do the “99 Bottle of Beer on the Wall”. The program compiles and runs fine, but, as they note, the output isn’t 100% correct. It took me a while, but I found it.
Continue reading Learning Java

Fixing GStyles

I am working on fixing the theme I am using, GStyles (available here) and trying to make it work with WordPress 2.3.
So far I have fixed index.php and singles.php.
Here is an original code snippet from singles.php (sorry, the code runs over the edge, the theme is fixed width so it runs over… I might make this column flexible in due time, one thing at a time… or see if there is a “word wrap” feature in the program highlighter)…it should be the same in index.php:
[php]Category: | |‘); ?>

This was fixed in my new version to look like this:
[php]Category: | |‘); ?>
‘); } else {echo “Tags: None”;} }?>
‘; } ?>
That should allow it to fall back to UTW if somebody is still using an older version of WordPress. However, I don’t have an old install to test it on, but near as I can tell it should be good.
I am now working on fixing the functions.php and finding a fix for the post2cat problems in it.
The problem with GStyles in WordPress 2.3 as it stands now also comes from the following in singles.php:
[php]No related posts


} else {

echo ‘





The fix is simple enough for now, just take that bit out. It kills the Related Posts function, but cattag_related_posts needs the post2cat. Now that is the part that may be past my programming experiences so far… then again, I did figure out how to get the rest working.

Yet Another Program I Want to Make

Oh for the time to actually do some programming.
I was looking at a college schedule, trying to figure out what classes I would want to take. For a single class however, there may be 6 during the same semester, and this is just the day ones, and 3 or so of which I could probably do before I had to go to work myself. To add to the complications you have 5 or 6 subjects to take during the semester so you had to really consult dates and times when trying to figure out which ones to take. I then decided the best idea would be to make a program where I would enter all 6 or so classes for each of 5 or 6 subjects into a program and use it to help avoid conflicts.
I then modified my idea to include warning levels if a class might conflict with work or the time to get to work. For example, I work at 3 PM. It might give a yellow alert when I have an hour and an orange alert at 30 minutes and a red alert at 15 minutes, all configurable for each user of the program.
The idea was further revised when talking with Sara and trying to figure a way that we can both work, both go to school and minimize the time that Ari would have to be watched by somebody other than us. To then the program idea was modified to allow 2 or more people see how much overlap they have and try to minimize it.
The unfortunate thing is that the user will have to enter lots of information. English Composition for example may be offered 12 times during the semester during the time period the user might be able to go. The user has to enter each of those. The user interface will make things easier by allowing the user to “duplicate” an entry and then all they have to modify is the Class ID (the ID given by the school for that specific class at that specific date and time, this compares to the Course ID which is what all 12 of the same class from above would share) dates the class is offered if that changes (class starting and ending dates such as 8/27/07 to 9/13/07), times, days (Mon, Tue, etc.), campus and room information.
I tried finding a program like this morning, but so far I haven’t had any luck, at least not free. Most of what I have seen, free or otherwise is geared to the school itself, not for the student, and none of which seemed to really do what I wanted. So I guess I have another program to add to my programming queue.

Back on the Developer Reading Block

I am getting back to reading Murach’s C# 2005 and Visual C# 2005 How to Program (2nd Edition) (How to Program) as I am finding myself a bit rusty having not programmed anything for a long time. I really need to keep myself doing a little bit every once and a while just to keep my mind fresh with it. I’ve gone on how good these two books are enough that I won’t go on again, but they are seriously great… Now if only I had a slightly better PC with a good DirectX 10 video card and Vista and I could really get cracking with Visual Studio 2007 when it comes out (VS 2007 will work on XP, but it is really meant to be for Vista development)… to be fair, actually my PC is mostly okay, perhaps a bit more RAM, it is my video card that is the problem at the moment.

My Lottery Program Part 4

Continuing my updates on the progress of my Lottery Program, I recently got it to parse the Mega Millions website to get the latest numbers. Basically it gets a text file, which I have yet to get the program to extract just what I want, but I am making progress slow and sure. I am a little rusty as I haven’t been programming like I should on a constant basis. It got me to break out Murach’s C# 2005 and Visual C# 2005 How to Program (2nd Edition) (How to Program), two great books on learning C# (I am guessing they both will be updating for Visual Studio 2007/2008 whatever it may be called, since there seems to be some major advances coming with it).
I really could use winning a small sum from the lottery myself. Beyond the need for new(er) cars, I could also use a good laptop so I could work on my programming lessons and stuff while away from the main PC (such as spending the day at Borders, or during my breaks at work and so on).

What Time Do I Leave Friday Updated

My What Time Do I Leave Friday program had a minor update today. No change to the main program, but the installer no longer chokes if your version of the .Net framework isn’t exactly as needed (sometimes it would have a problem if you had a newer version). It still checks your .Net version, and if you have an older version, it will offer you a chance to download the newest 2.x version… so basically, it is just an installer upgrade. 🙂
It will not download the newest 3.x version of .Net, and it appears it will download the newest 2.x version, run the .Net installer then continue to run the rest of the install. Also, the installer presently only checks if you have 2.0, not if you have the absolute newest version. I may change the value later to be sure you have the newest version, but since the program only requires 2.0 that is all I checked for.
Anyhow, the newest version of the program can be found here. Download the .zip, extract it then run the setup.exe. The program includes a help file to help you use it, though I think it is fairly straight forward.

My Lottery Program, Part 3

What I meant to say in my previous post about my Lottery Program before I got too distracted, was to continue on about selling the program in a few stores that I figure are more or less a lock to get into, short of it being against the rules for them to sell it there. Since we have friends and family that owns stores that sell tickets, I figured it would be natural to start sells there, however I have a couple issues to address before I can do that.

  • My CD/DVD burner doesn’t recognize CDs. Something got messed up with it’s laser alignment or something, I don’t know, so I’ll have to get a new one. I have a few models I am looking at. A Pioneer Black 18x, about ($31), Lite-On LH-20A1H ($33 for OEM, $38 Retail) which adds LightScribe which may be helpful and nullify one of the points below, on up to the Plextor PX-760A ($100) which doesn’t have LightScribe but is faster than the others, and being a Plextor, a bit more reliable. If I was to get one right now, it would probably be the Lite-On with LightScribe, since it save me the expense of…
  • My printer is a Cannon Pixma IP4000, which outside of the USA here can print on printable CDs and DVDs. In the US, they took out two parts and put in a slightly altered front door. So to print on CDs, properly, you need to buy two parts, the roller and the tray. Both are available on eBay and the two parts together will set you back $31, not too bad really (note the link only takes you to the CD tray, the CD tray in question needed for this printer is tray B, but a few of the listings have the roller as well). Details on CD/DVD printing on US IP3000/4000/50000 are available at the link provided. The nice thing is that this provides for full color printing on CDs and DVDs that are inkjet printable, unlike LightScribe which is monochromatic, though some of the newer ones have a background color other than just gold. It is probably recommended to get anyhow, even with a LightScribe burner, there are times when either you want color, or like me you have a bunch of inkjet printable disks.

Continue reading My Lottery Program, Part 3

More on My Lottery Program

Continuing where I left off with regards to My Lottery Program that I want to make.
It also occurred to me while starting out the design there are several stores that I could sell it in if I can get it to a semi-professional status. All of them sell lottery tickets, so it would be a natural for them to have a program, made by somebody in the family non-the-less, to help people pick ticket numbers. It may entice them to buy more tickets, which equals more revenue for the stores. Unless of course there are rules against having such a program in a store that sells lottery tickets.
In regards to Lottery Wheels, another example. Let’s say you have 7 numbers you want to play on the Mega Millions (not counting the Mega Ball) you will end up playing 9 tickets to guarantee a win of 4 numbers. Again, 4 of the 7 numbers you picked have to come up, so the guarantee just says that one of the tickets will be a winner in the event 4 of your 7 are drawn, which you can’t guarantee with just a pure random selection.
Random numbers is such an interesting concept. You would think randomness would be easy to achieve, but say if they drop all the numbers into the lottery bin in the same order, at the same rate every time, and the paddles in the bin are in the same spot every time, your ability to be truly random, even with a machine like a lottery machine goes down some. Computers have an even harder time generating truly random numbers. The Free Cell game you have on your computer has 1 million different deals (on XP anyhow, only 32,000 on older versions, see the previous link for more details of the number of deals and solvable/unsolvable ones). Nobody programmed all 1 million deals in (or 32,000 for that matter0, laying out what order each card will come out in. The way they archive it is that they give the random number generator a number called a seed, and from there it generates a random pattern, except after the first time, the same seed results in the same pattern. Generally to pull a “true” random number the computer will use the time clock, the problem is, two otherwise equal PCs doing the same task at the exact same time would get the same results, so you are once again not truly random, though this is normally random enough for most things. There is a logical reason for computers to be so predictable with random numbers, and that is testing. By constantly giving it the same set of seed values you can predict how it should behave and find problems with other aspects of a program or something before seeding it with a truly random number.
Anyhow, there are some features that I plan on adding that I haven’t seen in any of the other programs yet, but then again some of them don’t have free time limited demos, so I can’t be sure, I don’t recall seeing these features on any of their feature pages. Since they don’t mention it, I won’t mention this feature until the program is out since this may make me a unique entry in the market place.

My Lottery Program

While checking out the USA Mega site yesterday, which I mentioned in my lottery post, I was browsing around I and found their Mega Millions Statistics. It seems some numbers come up more often than others, a statistical anomaly one would suppose, but one that is there none the less. For example, 25 has came up 28 times in the last 195 drawings, 07 and 36 27 times, while 47 has appeared only 9 times with 19 having been pulled only 7 times. This got me thinking that it would be interesting to take a program that allows the user to filter certain numbers out of a list when it generates a the lottery number, further the user would be able to make a list of numbers they wanted to either be weighed more heavily, or a short list of numbers that they wanted to pick from. Say they picked a short list of 8 numbers, the program then would generate numbers just from that list.
Continue reading My Lottery Program

Microsoft’s Beginner Developer Learning Center

Microsoft has launched their Beginner Developer Learning Center which takes people from no programming experience to a basic level of experience. It teaches Visual Basic and/or C# whichever one want. The first thing you decide is which track you want, Web Development for dynamic web sites, web applications and services, or Windows Development for making Windows applications and games (they don’t have a game tier, at least yet). After deciding which track you want, you choose a tier. Tier 1 is an introduction to the basic concepts and an introduction to the language of your choice. Tier 2 gets you grounded in the basics of .Net programming and gets you to make an basic application in the language of your choice. Tier 3 gets into data access, data binding and other such concepts.
I haven’t had a chance to use the site to learn from yet myself, but it looks like it will be a nice site to use. It however won’t beat Murach’s C# 2005 and Visual C# 2005 How to Program (2nd Edition) (How to Program), both of which I highly recommend, but the site is free and seems to do a good job of getting the basics.

Trying to Write My Own Widget

Calling all WordPress Widget experts, I am trying to write my own widget, but I am not having luck. I get it to show up in the plugins and activate it, but it doesn’t show on the widget list.
I know about Chris Johnson’s Tag Cloud Widget, but the cloud doesn’t show for one thing, and the other is that I don’t want it weighted, I want it shown in alphabetical order. It shows the title and nothing more using his… Okay, I got it to display by changing the display from 1 to 50, but that doesn’t do a display all like 0 was supposed to do… Okay, I also got it to display in alpa order so I guess the code below is moot. 🙂
The code appears below the break, with a few comments after the code.
Continue reading Trying to Write My Own Widget

What Time Do I Leave Friday Updated

I made a couple minor changes to my What Time Do I Leave Friday program that I made. This brings the beta from 0.5 to 0.5.3. One of the changes was behind the scenes and doesn’t matter to the end user. The other change was having the program check to see if the user entered a digital time in the two main text boxes on the main form, if they did it offers them a chance to go back and edit it or accept it. I am not overly happy with the method used at the moment, and will be changing that soon. I’ll probably add something to the Validator class so I can handle it on more forms. A third change was to have the program start centered on the screen rather then in the upper left.

What Time Do I Leave Friday Ready for Testing

My What Time Do I Leave Friday program is ready for testing. Contact me for the setup file. I can either send it as a zip file, where you unzip it and click the setup.exe, or just send the setup.exe file itself. The zip file is 188kb (under a half minute for most people) and the setup.exe itself is 204kb (under a minute for most people) 488kb (under 2 minutes for most people with dial up, and very well under a minute for cable modems) (edited to add size change do to adding the help file which I forgot the first time).
As noted before, you will need Windows 98/ME/2000 or XP to run the program, and it will need the newest version of .Net installed, which you should be able to get from Windows Update. If the program or installer complains about you not having the newest .Net, let me know and I can send you a file that will install it for you.

What Time Do I Leave Friday Ready for Testing this Weekend

My program What Time Do I Leave Friday will be ready for testing this weekend (26th or probably 27th of August). Let me know if you want to give it to help out and test it out.
The system requirements are a Windows PC (likely will need Windows XP or Windows 98/ME as it needs .Net 2.0, which it should download from Microsoft if you don’t have). If you are running XP, then you should be golden, although I see no reason why a machine that runs 98/ME shouldn’t be able to handle it.
What I need the testers to do is, run the program, and report back about the program. If it gives a false value or whatever. Give as much detail on any errors or false values as you can, such as what you were doing, what numbers you entered into where and the like so I can try to recreate the problem here and fix it.

What I Need In A Development System

In order to become a better developer, I figure these are the things I need. So if anyone out there has a ton of money just wasting away and looking for a good cause… 😉
A good laptop so I can work on my programs when things are dead at work… which was often, but starting today I’ll be by myself each night from 6 PM on. This laptop should be a Core Duo processor, 17″ or bigger WUXGA display (1920 x 1200) with a very good nVidia or ATI graphics accelerator with preferably 256 MB RAM, as this will ensure it will allow all of Windows Vista features to work properly. A dual layer DVD burner (which needs to be able to burn CDs as well, though almost all of them do anyhow, so a nearly moot point), or Blu-ray burner (I think Sony is the only one to make a laptop with a Blu-ray burner on the market right now, and it matches all the other specs needed as well). It should have Windows XP Pro or Media Edition installed. 1 GB RAM or more. The hard drive should be at least 150GB, preferably 180GB or more. It looks like this is about $2000 on up to $3600 or so (the $3600 version is with Blu-ray so that is why it is a few hundred more). The price is generally higher then other laptops as the graphics chip, the widescreen WUXGA display and a few things like that.
Of course I also need a full version of Visual Studio, either Standard or Professional. The standard version is only $40 if you can get the academic edition, otherwise an upgrade edition is about $161 (I am not 100% sure I still have the CDs of the old version to make the upgrade install) and the full version is $246. The Professional version adds a few good tools that would help a lot. The academic edition is only $93, with the full version costing $686. (All Visual Studio prices based on prices from Provantage, a national programmers catalog that is also local store formally known as Programmers Connection.)
HelpStudio 2 would be a nice bonus… hey, the laptop likely was close to $2000 to $3600, so what is another $470?

C# Help Needed

If there are any C# programmers out there reading this, perhaps you can help.
First I’ll repost a screen shot of the program I am working on:
Screenshot - What Time Do I Leave Friday - Main window
Under the Action menu, there is an option to change the Standard Work Week (by default set to 40:00). When the user selects that, the standard work week text box changes from read only and a save button (not seen on this shot) becomes visible and active. The user then can edit the standard work week, save it and then have the program calculate what time they are to leave Friday (or whatever their last day of work is). That woks as expected. The problem comes up if they edit the standard work week, but don’t save it and then hit calculate. It will calculate based on the last saved (or if never saved, the default) standard work week, which may not be what they typed into the text box.
What I have in place now is a message box that pops up if they try to calculate before saving their work. I currently am using an OK button message box, where if the user selects OK it saves the standard work week and then performs the calculations. Ideally I would like a Cancel button to take the focus back to the text box and wait for them to save it. Then the program could either continue performing the calculations, or the user may need to hit Calculate again.
Here is some code to give an idea of what I am doing:
Continue reading C# Help Needed

Name That Microsoft Product

Steven Smith at Microsoft is taking names for Microsoft’s Atlas (more or less Microsoft’s version of AJAX with enhancements). I personally like his suggestion of “Web Technology Framework – WTF (!)” but it is missing the word Foundation, which seems to be on lots of Microsoft technology these days, perhaps switch Framework with Foundation and you get closer to a good name.
What I am not clear on yet is how compatible Atlas is with Linux and Apple. They say they work with Safari, so I am guessing it works on Apple, but to be truly cross browser it would need to work on Linux browsers, be it Firefox, Opera or whatever. Having .Net on all 3 platforms (Linux, Apple and Windows) would be a true boon to developers… even if all Microsoft gave us was OS X and Windows (and XBox 360 as I reported earlier) that would be cool… no need to use Mono…