Join Nathan Strutz as he shoots the breeze on techie geeky web dev stuff.
posted under category: Free Code For You on November 10, 2008 at 8:36 pm by MrNate
Hey all - quick note to let you all know that I issued my first commit of many into the SQL Surfer project. No real single-file download yet, but you can download the source and build your own with Eclipse, Ant and Groovy (if you dare!).
I'll share some more ideas with you all as I progress.
(
0 comments)
posted under category: General on October 29, 2008 at 8:26 pm by MrNate
Reuse-in-the-small is a solved problem. Reuse-in-the-large remains a mostly unsolved problem.
Jeff Atwood from Robert Glass, Facts and Fallacies of Software Engineering
I'm actively hacking at my latest
toy project, which integrates a few 3rd party projects, and I had the thought, integrating a library, like
jQuery, is drastically simpler than integrating a whole application, like a discussion board or WYSIWYG text editor. How do you solve these problems?
A few years ago I attempted to drop
Ray Camden's Galleon Forums into another project. My app was Fusebox, so I had to rewire some of the front end, then move the component calls back out to the circuit. Sounds fairly easy, but with 3 gaping problems.
1st, the client calls and we have to modify it heavily. It turned out the only thing Ray's app was good for, was a starter kit on the database and DAO templates.
2nd, Ray puts out a new version with features we like, avatars, BBcode and signatures. We were so far out of sync that there's no way we could implement his new version.
3rd, I was never sure how stable the rewritten code was (turns out it was ok, but I was crossing my fingers).
Result: Thanks for the starter kit, now I'm on my own.
Fast-forward a few years to my new project, and I've started integrating
Edit Area, a javascript code editor, into my application. Edit Area presents a few challenges, including the build program written in PHP and the authors not being native English speakers. Also, I have some application requirements, such as no externally linked files, and oh yeah, it has to work right (grrr).
So, how do I make changes to the application while keeping myself open to future versions?
The method I chose was to make changes to Edit Area in my build file. Ant calls Groovy. Groovy reads in their file and turns it into my file, which my program includes. It is repeatable but not destructive. When the next version comes out that fixes some of my problems (and I do hope it does), it will be mostly zero effort to update my code. Their changes could break my build temporarily, but I can tweak and adapt.
The biggest issue here is the challenge of meta-programming, or programming programs to reprogram programs. It's a lot of trial and error to get it right, and a lot of regular expressions. Also, Ant isn't exactly a real programming language, so I have Ant run a Groovy script. It's initial complexity to solve a repeating problem, which is a fair trade to me.
Result: Brainiacs only, but it works well.
(
2 comments)
posted under category: Free Code For You on October 19, 2008 at 5:51 pm by MrNate
I kind of went overboard on the languages & platforms with SQL Surfer 2.0, which I first mentioned early yesterday morning. Luckily, the finished product is just running CF/HTML/CSS/JS (That's 4).
The build process uses C# (+1) to customize fixes to Edit Area.
I used a batch file (+1) to copy the C# exe to my dev folder.
The build file is Ant (+1), and Ant is in XML (+1).
The build file uses groovy (+1) to replace some includes with actual content.
Total count: 9 different platforms, languages or technologies. Not bad for a little SQL tool.
UPDATE 10/23: I move the c# asynchronous process into Groovy during the build process, so that removes 2. That puts me down to 7 now.
(
0 comments)
posted under category: Free Code For You on October 18, 2008 at 12:32 am by MrNate
My wife has been on me to work on some projects that will make us money. Instead, she's seen me hacking away at this little toy. SQL Surfer 2.0 is a web 2.0 style SQL query editor. I've been playing with it for a few weeks now, and I've got to say, it really is starting to rock.
I had this old version, version 1, which was like your basic postback SQL tool in 200 lines of code. Well into 4 years old now, I was still using it, and i felt completely ashamed. Bad programmer. It looks lame, it works lame, but at least it worked. It had some cool ideas, like how it has a 1-file deployment for the whole thing - drop it in anywhere and it just works. Also, I like how it saves everything you run into a history box, but even that was limited.
SQL Surfer 2.0 brings the whole thing into web 2.0. I'm playing with some CF8 features now, but I hope to also deploy a CF6 compatible version. As always, I'm having trouble getting it to look right in Internet Explorer. I'm planning a beta "soon," so this is like a heads-up teaser.
Yeah I know the concept is like a solved problem. Ray Camden has the Database Explorer and Todd Sharp with Genesis, but I think I have a unique twist on the subject. More to come as I prep this one.
(
2 comments)
posted under category: Life Events on October 6, 2008 at 8:39 am by MrNate
I had completely promised myself that I would NOT join MySpace, just as a fundamental stand against poor web design, even if they did write it with my favorite programming language. As a result, I had mentally discarded social networks in general, but, when you get married, you know, you make some compromises. So anyways, a few weeks ago, Alanda talked me into joining Facebook (in exchange for me taking out the garbage and cutting down a tree and giving her a massage -- I think she got the better end of the deal).
If you don't know social networks, basically, you find all your friends and talk about yourself so they can keep up with your life. It's less formal than a phone call or even an email, but better than spreading hearsay and 3rd hand information. Then they can comment on what you say and vice versa.
Facebook is especially nice in that the usability of the site is fantastic and the design is consistent throughout. Pretty much any activity I would like to do from any given area is already there. Thus far, they've thought of everything. As far as social web sites, including ones I've worked on, it's the best I've seen, by far.
Just in this past few weeks I've found a friend from school I didn't know was living in town. Anyways, if you feel like it, come look me up.
(
0 comments)
posted under category: General on October 3, 2008 at 8:29 am by MrNate
A few days ago, Tony Petruzzi posted "It's official: jQuery wins!" I took it with a grain of salt, but left it in the back of my mind. Then today, I saw the State of jQuery '08 slideshow. Now, I think Tony was right.
(
1 comment)
posted under category: Database on September 25, 2008 at 11:20 pm by MrNate
Along the trail of web-based ad-hoc query tools, I also have the need to back up my database from time to time. Having no direct connection to SQL Server across the internet on my host, I can't just use the SQL Server tools to do it.
Another scenario: a couple weeks ago I installed SQL Server Express 2008 64 bit. It's been running really well on Vista 64 and working fantastically with ColdFusion 8. The problem is, I had to recreate a local copy of dopefly.com's database (it runs the blogs and family photos apps). Then, I knew I wanted to populate it with some data, as close to the live data as possible. This is a pain because the only way to get the structure is to eyeball and hand-jam it. yuck, no thanks.
Well, I came up with a pretty good solution for myself, but I was hoping to get some advice from other people as to how they would do it. Any ideas out there?
(
2 comments)
posted under category: Free Code For You on September 23, 2008 at 6:39 pm by MrNate
So after nearly a year of sitting on Pagination 1.0 RC, I finally have the 1.0 release of the data paging library for ColdFusion.
The only thing in the 1.0 final version that I changed from the release candidate was the error messages. Most of the questions I had were about why they were getting a variable doesn't exist type error. Turns out they didn't call init() or didn't set the queryToPaginate item. I added some checking and some cfthrows to better explain what is happening.
Pagination.cfc is available to download at RIAForge, and the subversion repository has all the files as well.
(
0 comments)
posted under category: Database on September 19, 2008 at 7:41 am by MrNate
I was just thinking about managing my database here on Dopefly. I don't have direct SQL access to the server (SQL Server 2000), so there's no using SQL Manager to do things. That sort of leaves me with FTPing my ad-hoc queries to the server and running one at a time (no please). That sucks, so my real solution was to make a web-based ad-hoc query tool, SQLSurfer (warning, old code!). I've got an admin area of the site here in a secured directory, so it's basically secure & safe, but I would not recommend installing it anywhere public, or anywhere that a client could find. Generally, I just use it for local development when I don't want to open big clunky tools.
The need for an ad-hoc query tool is debatable, but I would say it is needed just to verify my data validity and run some small reports, like, I don't have a screen that will display the most recent comments on the blog, reversed by date (for spam checking when my email was down). Or what about when I am trying to remember the names of my tables when I don't have a local copy running - it's perfect.
I'm sure I'm not the only one to have this general problem, so my question to you is - do you have a web-based ad-hoc query tool? What tools do you use? Really, I guess it comes down to how do you solve the problem?
The reason behind this is that I'm thinking of updating the old SqlSurfer (run a selected block of code, better history management, ajax), but am wondering if anyone has anything better already.
(
0 comments)
posted under category: ColdFusion on September 16, 2008 at 1:16 pm by MrNate
I've got a few of these types of entries lined up. If you have a blog, post your own!.
<cflock name="#createUUID()#" type="exclusive" timeout="30">
This code creates a uniquely named exclusive lock - that's an oxymoron. If the name of the lock is unique every time this code runs, the cflock will never lock anything until somehow, magically, createUUID() returns the same value twice, within 30 seconds (right, not very likely).
(
3 comments)
posted under category: General on September 6, 2008 at 7:04 pm by MrNate
Selenium is an open source, simple web site testing and automation platform. I say it's a "platform" because it can't really be classified as just a tool, a language, API or a full application, but rather to a degree, all of these.
The basic idea is to create, using very plain, easy HTML, a repeatable script that is then executed by a Selenium runner.
I recommend using the Selenium IDE to create your first script. It's an add-on to IE and Firefox that records your clicks. Save it to a file (it generates plain HTML) and you can repeat it later on. It won't always work perfectly, however, so you can edit it with any text or HTML editor. You just need a Selenium language reference to get by.
Selenium actions and accessors are the language you program your scripts in. Generally, you would use the click action, type to enter values into forms and things like assertText to make sure certain content exists.
One part of using the language you will have trouble with is selecting elements. Hopefully, you use uniquely named text links everywhere. If not, Selenium supports XPath very nicely. For me, it's a matter of sprucing up my XPath skills, something I wanted to do anyway.
Selenium scripts consist of a table with three columns. The first column is the action to perform. The second column is like the first argument of a function, usually this is the item to perform the action on and is almost always used. The third column is like the second argument in a function, usually the content of the action like the text to enter into the form item from the second arg. This column is not always used.
Selenium scripts must run within your web browser, however, different tools to automate your browser exist:
The Selenium IDE will run a file off your disk. This is perfect for single scripts and quick browser automation.
Selenium Core is a javascript application that runs on your web site - put it on your dev/QA site. Being a javascript application, there is no server-side interaction and nothing to install. This method requires your scripts to live on the local web site as well (browser security). This is actually very natural feeling, as then you can check them into your source control (you HAVE source control, right?).
(jump break)
(
more on this subject) (
7 comments)
posted under category: AZCFUG on August 26, 2008 at 2:07 pm by MrNate
Oh man, only 2 posts since last month's meeting. Am I ever slacking. Anyway, tomorrow, Wednesday, August 27, 2008, is another valley-of-the-sun CFUG meeting in Tempe. Jim Bambrough from Amkor is going to be talking about Mach-II and Eclipse, and giving us basically a nice overview of the technology he uses and how he uses it. It should be good.
As always, there's door prizes and stuff just for showing up. Check the site for details and directions: azcfug.org.
(
1 comment)
posted under category: CFEclipse on August 11, 2008 at 12:14 pm by MrNate
I've heard it 2 times in the last week that people are having trouble using the find features in Eclipse, so I thought I might be able to help a little.
#1 - Refresh your project files automatically
#2 - The search dialog box
Hit the link to read it.
(
more on this subject) (
3 comments)
posted under category: General on July 29, 2008 at 10:35 am by MrNate
At work, we are required to take 5 days of training this year. This is a challenge for me on a few levels. First, I have a new baby at home, so I don't want to leave the Phoenix area. Second, I'm having trouble finding classes that are open and applicable to me.
I have a SQL Server background, and I'm using Oracle, so I tried to get into a good Oracle class, but it was cancelled, so now, I'm weighing Java and .NET among others.
Unfortunately, at this point, it's quickly turning into an annoyance that i just have to 'fix' instead of the terrific learning opportunity that I'm sure it was meant to be.
If anyone has any suggestions, I'm all ears.
(
4 comments)
posted under category: AZCFUG on July 24, 2008 at 2:58 pm by MrNate
Bryan did an awesome job at conveying how simple it is to begin using Java in our CF applications, how helpful Eclipse is for Java development, how to make a simple Java GUI with NetBeans, how to work with the Java threading model, how to use a generic JDBC driver (jTDS) and how to create Excel files with Apache POI. It was awesome how much he covered in about 30 minutes. Bryan was well prepared as well, which was great because I only gave him like a week to prep (sorry!).
We don't have anything planned for the August meeting, so we're looking for volunteers!
As a final note, Alan asked me to co-manage the group with him, which I accepted. I guess I was the heir to the schwag box anyway, so this way he doesn't have to die first. It's good all around because I hate doing that. (yeah, of course i'm kidding).
(
0 comments)
posted under category: General on July 15, 2008 at 4:55 pm by MrNate
With my old MCE experiences blogged, now it is time to discuss my upgraded Media Center PC. No, we're not going Tivo, that would be ridiculous. We are, however going completely off-the-shelf this time. For not much more than the price of a nice Blu-Ray player, we purchased a PC with one included, from woot. Here are the key PC stats:
- Quad-core CPU, perfect for encoding and decoding video, and doing multiple tasks all at once, but higer electricity costs
- Windows Vista Home Premium - I hear the upgraded media center software is fantastic
- 3GB of RAM - 10x more than I ever used on my old HTPC, but will be nice because of Vista
- High-def TV tuner with cable and atsc inputs - I doubt it has hardware MPEG encoding, but the recorded content will be mostly standard definition cable
- Blu-Ray/HD DVD combo drive - I guess it was a clearance item
- Two, 500GB SATA drives - 1TB total. If it has an IDE channel, I might bring over a 320GB drive from the old DVR
- Card reader - a big plus, considering it is our digital photo center
- 8-channel audio - I wish it was digital audio, but it is an upgrade from 6 channel
Additionally, we made 2 changes in the home network:
- We upgraded the router to 802.11n - now file access will be faster from other PCs
- We moved the router and cable modem over to the entertainment center; now the HTPC connects via 1Gb ethernet, as it has no WiFi adapter
Overall, this will be a good, much needed upgrade. We've been enjoying having an XP media center so much, I think that with a faster CPU, it can only get better.
(
1 comment)
posted under category: General on July 10, 2008 at 12:09 am by MrNate
A couple years ago, I wrote about my experiences with building my first Media Center PC - a low powered, half-purchased, half-constructed PC, DVR, file server and entertainment center based on Windows XP MCE. Since then, I've discovered a few things that have been working really well, and a few things that have not. These are my experiences.
Things that worked really well:
- Low powered CPU - budget-wise, has been nice on the electricity bill, considering this PC is on 24/7
- Purchased instead of built the core components - this gave me rock-solid stability, rebooting mostly just for an occasional sound glitch
- Recycling old IDE HDDs - gave me about 750GB of total storage
- DVD cataloging - We just put unwatched or often-watched movies on the HDD so we don't have to relocate the discs
- uTorrent's WebUI - I can access it from my desktop PC, which is only on occasionally, and have my media center download torrents 24/7
- MCE's movie library - allows us to access DVDs, Divx and home movies across multiple HDDs
- File server as a central location for our gigantic digital photo library
- 6 channel audio - even though our receiver supports 7.1, we only have a 5.1 speaker setup anyway
(jump break - things that sucked up next)
(
more on this subject) (
4 comments)
posted under category: ColdFusion on June 20, 2008 at 10:58 am by MrNate
Adobe has graciously granted a copy of ColdFusion 8 to the AZCFUG, and, by physical proximity (my site is on their server), Dopefly has been updated to CF8.
Amazingly, this is the first application I've gotten to work on CF8 with, and it's about time!
Thank you Adobe!
(
0 comments)
posted under category: General on June 18, 2008 at 9:06 am by MrNate
My mother-in-law passed away last month, and I haven't really had anything to say here since then. I have some pre-written stuff, I just didn't really feel like posting it. We're still coping with the loss.
At work, I just got a major release out of the way. It was 6 months in the making, so my boss is prodding me to become "agile," as in, regular releases with smaller changes. I agree, so I'll be experimenting with it. A year or so ago we had a client who demanded us to work with their agile process, which was just a huge, uncomfortable time wasting disaster. It makes sense in development teams, not so much in a business end where you're paying developers in another company, halfway around the globe, by the 6-minute increment to sit in your daily hour-long "scrum" calls. That was just set up for failure from the start.
I had some thoughts on code coverage, but I'm still not sure how to word it. I think my current application's code coverage is around 15% - hey, it's better than zero!
Firefox 3 - I'm liking the new features, but I've had a few javascript-heavy pages that wouldn't render, such as the uTorrent WebUI that I have running on my media center box at home.
Alanda got a new notebook (dude, guess what brand). Great machine, but riddled with problems, and, for the record, the Intel X3100 is NOT a decent video card for ANY gaming whatsoever. We're returning it, free of charge. Would buy again. Instead, Alanda's letting me build her a PC. She'll take my old video card (GeForce 8600 GTX) and I'll get a new one (probably a 9600, waiting for the price drop once the new nVidia cards are out in a couple weeks).
We're taking her old tablet PC downstairs to stream media to the TV. The downstairs (it's just a single, small room/bomb shelter from the 60's) is being converted into a workout room.
Final note, we've gone 'N'. I upgraded my router to an 802.11N Linksys. This will make a huge difference with movement of video files and music to and from our media center / file server / backup server (via Mozy).
We have to tell our kids that most people don't have a computer on their TV. They're like "Wow, really? Why not?" They have no concept. It's adorable.
In summary, I'm sad, I'm busy with home PCs, and I'll keep blogging.
(
1 comment)
posted under category: General on May 6, 2008 at 12:34 pm by MrNate
At home, I've been using Vista Pro, 32 bit for nearly a year. I got it free from a developer promo Microsoft was pushing. I'm fairly cheap, and fairly into developing windows software, so I went for it. My XP install at that point was almost 2 years old, which is ancient for me. I was eager to wipe it and try out Vista.
A few months ago, Microsoft had another promo, and I, being cheap, traded my privacy for Vista Ultimate. My software came last Saturday.
If you don't know, when you get Vista Ultimate, it comes with both 32 bit and 64 bit discs. Since I was going to trash my Vista Pro install anyway, why not go 64.
I decided to split up my primary partition and make room for an XP install to make sure my kids' software still works, and, you know, just in case. Truth is, Vista can't be trusted.
So I installed XP, which overwrote my boot record. Now only XP will boot. I formatted my boot partition and installed Vista 64 - a good experience, but not as good as installing Ubuntu. Now only Vista will boot.
XP's recovery software is awful. Truly bad. Wait 20 minutes for the DOS-like installer to load SCSI drivers that I don't need, then give me a crippled DOS prompt. If you destroy your boot records with XP (which I did 4 times), Vista's install disc will fix it for Vista, but there's no clear way to get them to dual boot.
Eventually, with a few lucky googles, I stumbled on EasyBCD. Great software. A few trial & error reboots and now it's perfect.
The 64 bit nature thus far has been a real sleeper. Vista hasn't crashed yet, so that's good. I haven't installed enough software to notice the larger memory footprint. The only thing even noticeable is the "Program Files (x86)" folder and the special designation for x86 software in the task manager. Not bad. So far, everything has just worked. I think the real test will come when I reinstall Crysis.
As for it being Ultimate, animated desktops, a poker game and drive encryption are not worth the extra money I would have paid.
Overall, it's good. I like having the things I wanted from Home Premium along with my IIS7 that I liked from the Pro version. The price was right. No complaints.
Next, I'm going to try triple-booting by adding Ubuntu.
(
1 comment)