Chomer Speaks

Archive for the ‘Programming’ Category

Wednesday, November 5th, 2008

I got one of my books on iPhone programming from Amazon.com. The iPhone Developer’s Cookbook by Erica Sadun. It’s been about two days now. I’ve been pouring over it at home and riding the train to and from work. I am finding it helpful. Will I realize my dream of getting an app in the iPhone App Store?

Obama has won the presidency. I think it is cool that an African American has done this. Been checking out CNN’s web site for the latest info. A note about their web site: they need to do something since with every page-load it seems everything locks up for 10-15 seconds. Not a good user experience! I’m not guilt free since my blog regularily generates a couple of javascript errors for each page load (though most people probably don’t notice cuz they don’t have debugging turned on in their browser)!

Bound Up Inside

Monday, November 3rd, 2008

It is amazing to me sometimes how one minute I can be focused, working away towards achieving some goals… And the next minute I can be paralyzed emotionally and find it to get even the simplest things accomplished. Feelings can be a bear to deal with can they?

I have accomplished stuff… but it is easy for me to get discouraged.

  • Got all three of my workbenches put together in the basement. The area is still a complete mess. Just looking at it floods me with discouragement. Allot of the stuff piled up in this area is not mine and I don’t relish figuring out where to put it or negotiating with the owner in an attempt to get it tossed.
  • Got books on Amazon eCommerce API. Looks good, but I’m not jumping in deep on this yet.
  • The books I’ve ordered in programming the iPhone and hacks in movie making (the ones I am most interested in) have not come yet. Some are not available yet. But, in my opinion, the others should have shipped from Amazon by now.
  • I got my bathroom exhaust fans… now I need to hire an electrician to install them. This should go a long way in getting rid of the problem of damp walls and mildew.
  • I’ve been toying with my WebRenegade web framework. But actual  work is hard to come by due to those irrational emotions.
  • I spent quite a bit of time trying to get a successful install of mySQL on my PC at home. So far no luck. This has been trully frustrating!

Well, writing this makes me feel a bit better.

A Little Update

Tuesday, October 7th, 2008

Well, it’s been a long time since I’ve posted to my blog here. There have been a few storms in my life I’ve had to work through. Things have relatively settled down now and there are various projects that I am working on, some having to do with this site!

One thing of note is that due to certain changes in my life now, I am free to move out of the area I’m in (if I so choose). If I wanted to interview for a new job would I be prepared? I’ve had a little site:  http://orville.chomer.com/ which contained information about me and included my resume to download. When I checked, the site was down! I had been messing around months ago with it and forgot all about it!

Time to get serious here. So, lately, I have been working to get this simple little site operational and accurate. My resume needed updating/correcting. This little site is coming but its not all there yet. I’m planning on making this my main focus in my personal project list until its really professionally done. Wait till you see the final version of the header/banner for the site — its not like anything I think you have ever seen!

I’ve also been working on a re-design of chomer.com. Instead of being static like the previous version, it is fully dynamic. If you are looking at my site now to see those changes, sorry, its not there yet (its on my local box). The site allows for both articles and blog posts and will use a back-end MySQL database to handle all the content. Once this is up and running, this Wordpress blog will go away. Before that happens, I will be copying all the contents of all my blogs to this new blog system.

The new system also uses heavy AJAX control using my Renegade Ajax framework. I am using this period to help shake out any issues that are in this framework. The application server I am using to write my new site software in is my favorite: ColdFusion MX (of course). I do have plans, once the site is finished and been in operation awhile… getting all the kinks out… of writing a new version in PHP and providing it for free to the community. If it comes out the way I see it in my head, it will be better than anything I’ve ever seen. Definitely better than anything I’ve seen for free for sure!

Furnace Room
Our furnace room has been a mess for a long time now. I’ve dreamed of having some sort of workbench down there. Well, after going to a cool show put on by MAKE magazine at the Chicago Science and Industry museum, getting a subscription and a best projects book, I got inspired. In the front of the book was a section on setting up a workbench! I’ve got enough room to set up an L-shaped work area made up of 3 benches which I bought at Menards. The instructions were a little shakey that came in the box with the first one I assembled but I learned a few things along the way. I am thinking about filming a video tutorial on assembling the workbench and eventually placing it out on YouTube. We will see. One project in my new MAKE book is building a Stirling Engine. I’d like to try that out on my new workbench(s)!

June 27, 2008

Friday, June 27th, 2008

There’s so many things rattling around in my brain right now (as usual) and its hard to know what to pick out to talk about. And I want to write. Many times during these brain log-jams, I just throw in the towel and I don’t write a thing.

I think the best thing to do is start typing. Just start typing into the blog.

My attempts at programming the iPhone are kinda so so. I have fits of programming attempts. My main road-block seems to be learning how to use XCode properly.

I’ve talked to people who work in the Oakbrook Apple store and the big Michigan Avenue Apple store in downtown Chicago. Not suprisingly, beyond knowing how to use the iPhone, they don’t have any info/help on how to program the thing. Gosh, I wish I had gone to the developer conference Apple just had in San Fran!

I didfind out about a programmer’s group in the Chicagoland area that meets once a month at the Michigan Avenue Apple Store. The Cocoaheads. I saw some stuff out there about iPhone programming. I am planning on going to their July meeting. Wish me luck!

I finally took my first 1to1 course at the Apple store on Finalcut Express. Pretty good! Sadly, I’ve had the membership for a while now and have wasted several weeks. I am all signed up for another 1to1 though.

Are you an iPhone developer? Do you know XCode pretty well? Do you mind if I bother you with questions? Let me know.

“Cree cree creee creee…”   sound of crickets…

I got to come up with a written list of my current iPhone questions to:

  • Bring to that meeting in July.
  • To give via email addresses shown at the end of the Apple “how-to” videos.

Am I babbling? Probably.

My health (panic attack and anxiety issues) has been gradually improving as I have been:

  • Staying away from caffiene
  • Taking GABA (An amino acid)
  • Taking 5-HTP.
  • Taking B Vitamins & Magnesium.
  • Trying to eat right.
  • Taking a multiple vitamin.
  • Trying to recollect what I did right for the day not what I did wrong.
  • Trying to recollect what I completed, as opposed to what I didn’t complete.
  • Not only let my body rest, but my thoughts rest too.

One thing that has been therapeutic, has been gardening.  I’ve created this whole new garden bed in my back yard. It’s got this nice edging, cedar mulch, and I’ve planted 3 new bushes! I hope that they survive.

The bushes have some new holes in allot of the leaves. I looked on the underside of the leaves… no bugs were found. I’ve now added flowers and garden lights to my garden bed (some flowers have not been planted yet). Oh, and I have one tomato plant.

I still have dreams of living in Hawaii some day (on the beach). Okay, I don’t want much do I? :P

Visited my dad at the nursing home. He was quite lucid. Haven’t seen him that lucid in quite some time. I know its not something I can expect regularly. If I had my druthers, I would live by the ocean in Hawaii and my dad would live with us and we would have in-home healthcare for him. I don’t know if my dad would live long enough for this to happen. I can dream.

Tutorial: Adding Custom Menus in Microsoft Excel

Monday, June 9th, 2008

Introduction:
It never crossed my mind for the longest time that there might be the possibility of of adding custom menus to Excel. Either ones that are specific with a particular workbook, or menus that are available for use with any workbook.

When I found out you could have custom menus in Excel, I spent quite a bit of time searching for how to do it. Microsoft’s site wasn’t very clear. A site here and a site there explained parts of the puzzle. Eventually, with allot of experimentation, I got it working.

This tutorial explains how you can create your own custom menus in Excel. The version of Excel I’m using is Excel 2003 SP3.

Custom Menu Modes:
There are two ways you can have custom menus:

  1. Custom menus that appear only when opening a specific workbook. In this case, we put the VBA code in that specific workbook which is executed in the workbook_open event handler.
  2. Custom menus that are available in Excel regardless of what workbook is open. In fact, these menus can be available even if no workbook is open! Basically it works the same way as when doing it for a specific workbook. The difference is that we save the file as an Excel Add-In. Then, we go to Add-Ins in Excel, and check our new Add-In.  It will be available for use from that point forward.

A Little More Information about Excel Add-Ins:
They are basically Excel workbook files with some exceptions:

  • They have a different file extension (*.xla).
  • Even though this “workbook” can have one or more tabs, all the tabs are invisible.
  • The file must be saved in the directory where the Excel Add-Ins go. Normally, if you pick the add-on file extention type in the Save As dialog, it will point to the correct directory for you.
  • Once an Add-Ins has been saved, it still must be picked (checked) from Add-Ins (Tools / Add-Ins menu) in order for it to work.
  • You must not have Macros disabled for Add-Ins to work.
  • Whenever you check an Add-In in Excel, or if you open Excel and the Add-In is already checked, the workbook_open event code will be executed.
  • Whenever you uncheck an Add-In in Excel, or if you close Excel and the Add-In is already checked, the workbook_beforeclose event code will be executed.

Menu Code Overview
Now that we got discussing Add-Ins out of the way, I want to basically give an overview of our code, how it works, etc.:

  • Our code for either an Add-In or an individual workbook is basically the same.
  • In our workbook_open event handler, we put in code to create our menus.
  • In our workbook_beforeclose event handler, we put in code to remove our menus.
  • When a menu item in Excel is created, it doesn’t go away, even if you close Excel. This may sound good, but if your menu was workbook specific and the workbook was no longer open you could get an error trying to call a procedure no longer in memory.
  • Because of the above, if you aren’t careful, you could end up with multiple menus with the same captions, etc. Basically a mess!
  • Because of this, before we create any new menus, it is smart to check to see if there are any old versions of the menus and delete them first! Our sample code will do just that!
  • Menus can have keyboard shortcuts. We’ll show you how to do this.
  • And of course menu items will have code associated with them which executes when the user clicks on the item. We will show how to do this as well.
  • Finally, once you have your menu working nicely, you may want to password protect your module to prevent users from messing with it. We will show you how to do this.

Creating our Sample File
Open Excel, and create a new workbook. You may want to delete the last two tabs since they are not needed, but this is optional.

  • Open up the Visual Basic Editor (VBE)  from Excel. One way to do this is to select it from the Tools / Macro menu. You could add a VBE button on your tool bar from the View menu sometime too. This makes getting into the editor allot faster going forward.
  • From the VBE’s Insert menu, pick the “Module” option.
  • I would rename the module to something like: “modMenuTest”
  • Press Ctrl-S to save your changes. Do this often as you work on your project!
  • This new module will contain the routines we will call to do the following:
    • House our menu building and removal routines.
    • House our routines which will run when menu items are clicked on.

First Routine, DeleteAMenu:
Add the following code to the new module:
(more…)

iPhone SDK Beta: Some Progress

Friday, May 2nd, 2008

To all you bright programmers out there, getting the SDK working probably seemed to be cake. Not for me. Apple made things confusing. But I’m finally getting somewhere!

Getting the first app example working (which I downloaded off of Apple’s site) was an uphill struggle. I was trying to get the  Kalimba Finger Piano working on my iPhone. Downloading the right licence files, putting them in the right places. Not to mention the fact that when ordering the SDK it took me to the Apple store to purchase it and promised a delivery within 5 business days, and that I’d need to be at the ship address to sign for it… Buzzz! Wrong!

I have now downloaded and got running on my iPhone several of the examples that Apple provides. These examples look like they will help me understand how to do different things that I need to understand in order to accomplish my desired goal: A simple game that I have in mind.

Pete from Trails In The Sand: thankyou for your help.

I’ve got a binder set up where I’m keeping all my To-do lists, activity logs, and misc notes for my game. I’m trying to give structure to this thing. I dearly hope this won’t end up being another unfinished project. I’m hoping that the simplicity of the game I want to write will help me in this regards.

The next thing I’m planning to do is assemble one of Pete’s projects and get it working. I think this is the next natural step in progression. It’s one thing to get working a project where all the files have been pre-added, and everything is pre-configured and get it working, it’s another thing to take the piece-parts and do that yourself.

After that, I’m really going to start digging into the code. My to-do list is much more detailed but I think you get the idea.

Tip: When selecting an item in Provisioning, it means more than highlighting it. It means checking the checkbox on the item. This little issue had me wasting probably 2-3 hours of time trying different things.

Monday, April 28th, 2008

I’m on the phone with Apple as we speak. I’m trying to find out what has happened to my iPhone Beta SDK. I logged into the Apple Store, checked my order status. The first thing I noticed gratefully is that it did show that I actually did order the SDK, and the my Visa card was charged for it.

What I did not see is any sort of shipping status information at all. The item says under Order Status that it is “Electronically Delivered,” but I saw no place under “Downloads” where I could download it.

Let me back up just a bit… when I ordered it, it seemed to imply that Apple would ship me a package containing the SDK and that I would need to be at the address when the delivery was made so that I could sign for the package. It was implied that the order would come as short as overnight but take up to 5 business days. Maybe I could get it today (6 business days)!

What is mysterious is that there is nothing under my order status to tell me that it shipped, or that it is pending approval before it’s shipped, etc. This is unclear. Hopefully on this call I will find out what’s up.

Right now, I’m on hold whilst the Apple rep tries to find out stuff.

Although I don’t like this, I’m not surprised really. All the things Apple has been doing lately, all the balls they’re trying to keep in the air, I think they’re doing pretty good considering it all… I still want my SDK though! :)

As I end this post, I am still on hold…

iPhone SDK Beta: Waiting For Delivery

Tuesday, April 22nd, 2008

I got the go-ahead from Apple Development to be in the Beta program for developing for the iPhone. I clicked on the appropriate link, filled in the proper info, whipped out the old credit card, validated everything, read everything and am now waiting to receive my package!

I was pleased to see that I wasn’t just simply given a URL to download stuff from, but that they were going to send me a package containing the goodies I’m looking for. I will have to sign for the package.

I signed up I believe Sunday evening. So I am waiting expectantly for my delivery. I will be able to finally try stuff on my actual phone. How cool is that?

An Update on iPhone Development

Monday, April 7th, 2008

UPDATED.

I have managed to get a sample  iPhone app compiled and running in the iPhone simulator that they provide. The app is an African thumb piano. It is a very imaginative use of the iPhone. It would be much nicer running on my iPhone rather than a simulator!

There are some really neat and creative sample programs in the iPhone SDK now, some of them besides being good sampls to look at as far as their code are concerned are apps that I’d actually like to have on my iPhone for my own use! I like the idea of the program that turns your iPhone into a level you can use to make sure that your pictures are straight! Cool.

I’ve spent a bit of time looking over the African Finger Thumb Piano code. I’m still trying to follow where the “start” of the code is. To be honest though, I’ve not spent allot of time looking into this lately.

My Status for Being Included the iPhone SDK Beta

Thursday, March 20th, 2008

I received the following email:

In addition to the rich set of resources currently available to you in the iPhone Dev Center, we’ve just added new resources to power your development as you create world-class mobile applications with the iPhone SDK.

Thank you again for applying to the iPhone Developer Program. We’re thrilled with the tremendous response we’ve received. We have many more requests than we can serve during this initial beta period, so we must limit the Program at this time. We plan to expand it during the beta period, and we will contact you regarding your enrollment status at the appropriate time. We appreciate your patience.

I’m not in yet, but at least I’m not out either.