Joel's Blog

I have no idea what im doing

6/08/2007

 

joel nylund apple widgets

You really shouldnt be reading this blog anymore, I have moved my blog to typepad and this is a test posting to test how quickly this blog is searchable. joel nylund antzy pantz backwards

4/19/2007

 

moving my blog...

to here for now. Trying to experiment with different tools.

2/11/2007

 

rails glass walls....great posting

How I wasted 2 hours on Sunday: http://sam.aaron.name/articles/2007/01/13/glass-walls-in-rails-habtm-join-tables

2/10/2007

 
Im not sure if this is a rails version thing, but I have a 1-many relationship and the scaffolding that comes with rails doesnt seem to build a dropdown for the child to select the parent in the new/modify. So I want to do this and I look in chapter 22 of my agile web development with rails book, and it shows: %users = User.find(:all, :order => "name") form.collection_select(:name,@users,:id,:name) this fails because form is nil, looking at the rest of my code I dont see form explicitly referenced, so I remove form and I get a wrong number of arguments for select. Finally I googled the web and I found <%= collection_select 'user', 'group_id', Group.find_all, 'id', 'name' %> this seems to work fine.

2/08/2007

 

rails is one big leaky abstraction....

So I have been playing with rails lately trying to develop an application and trying to learn ruby and rails(more on this later). So I have my app working pretty good last night and I check everything into subversion and then go to bed. Tongight I get the kids to bed and think I can get a few things done and I fire up locomotive and mysql and go to my login page and I get a 500 error. So I look in the development.log file and I see: Expected /Users/joelnylund/locomotive/joel/joel/config/../app/controllers/account_controller.rb to define AccountController /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:250:in `load_missing_constant' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in `const_missing' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:465:in `const_missing' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/inflector.rb:251:in `constantize' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/core_ext/string/inflections.rb:148:in `constantize' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/routing.rb:1258:in `recognize' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:40:in `dispatch' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:84:in `process' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/1.8/sync.rb:229:in `synchronize' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:83:in `process' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:580:in `process_client' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:579:in `process_client' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:673:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:267:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:266:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:127:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/command.rb:211:in `run' /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231 /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/bin/mongrel_rails:18 Pardon my french, but what the f**k is this supposed to mean? Thank god for google, I google some variations of this error message and I finally find this posting: http://www.forbiddenweb.org/topic/140110/index.html and it says add the following lines to your environment.rb file and restart your server: module Engines CONFIG = {:edge => true} end The funny thing is no one in the post seems to know why, but they all say it fixes the problem. So I add it thinking why not... and surprise, it fixed my problem and now my application is working again. So what happened that yesterday my rails program was working fine, and today its not working any more. Now I have these 3 lines of code in my environment.rb file and it works great again. Hmmm. I have to admit im still learning rails but the typeless language coupled with the code generation and frameworks and lack of a descent debugger is about to make my head spin off. I remember similar feelings when I was first learning java 10 years ago, so I am going to give it some time before casting final judgment. If you read this and can explain please send me email and I will post an update....

11/17/2006

 

How to ssh without a password

On client machine run ssh-keygen -t rsa , it will put a line in a file called id_rsa.pub in your .ssh directory. Copy this line to the server and put in file called authorized_keys in the .ssh directory of your user on the server. I use this when I want to automate a batch job to scp or rsync (tunnel) files between 2 machines.

10/27/2006

 

Its a networking problem.....

Its a networking problem..... This is what most developers say when there is any issue in connecting between a program running on one server and a program running on another server. When you are a programmer and you make a remote method call, or even a socket connection, you are relying on all the layers of software and hardware between your two services to make it happen for you and give you the connection you need to share data. When this fails it is typically referred to as a leaky abstraction. When there is what I now call a "Connectivity Issue" (I used to call a firewall problem or at best a network problem) most application developers will throw their hands up in the air and say it just doesn't work!. Some will call a network engineer, but they might not be able to help (unless they have a good application background) or some would call and Systems Administrator, that might not help either depending on where the problem is. Finally a good architect should be able to diagnose and troubleshoot these types of problems, usually very quickly if they have access. Side bar:: one of the biggest issue in large companies today is the Siloization of IT folks into these functional groups where no one can solve a problem like this. Even if there are people with the talent they usually don't have the access to solve. This is one of the reasons I am starting to believe that software engineering doesn't scale, see future blog on this one. Now I would like to write down the steps I take (or should take, because sometimes I skip a step and it causes big problems) to solve these types of issues. First I determine if it is a (1) DNS problem, first, if you are using a name and not an IP address, it could be a DNS issue. DNS issues can be complex to track down. They can be a caching issue, mis-configured iterative resolver, unhealthy iterative resolver or one of many other problems. For troubleshooting, I recommend you use IP's, or in the case you need a name, add an entry to your /etc/hosts file. For further DNS troubleshooting info you can look here. Once you have eliminated DNS as an issue you need to figure out if you can get (2) basic connectivity to the server. For simplicity I recommend turning off all your software services and running netcat on your server (example: nc -l 1234 to listen on port 1234). Remember on Linux you need to be root to run on a privileged port like 80. Once you have your server running the process, go to the client and telnet to server on specified port (telnet IPADRESS 80) you will get a login prompt, here is an example client --- server conversation: // Server, joelslinux: [root@joelslinux .ssh]# nc -l 1234 joel is col ???? [root@joelslinux .ssh]# // Client Joels-Macbookpro:/Users/joelnylund root# telnet 192.168.0.35 1234 Trying 192.168.0.35... Connected to 192.168.0.35. Escape character is '^]'. joel is col ^CConnection closed by foreign host. As you can see netcat works as an echo server. If you can get connectivity with netcat, you have narrowed your problem down to a problem at the one of the application layers on either the client or server. You will be very tempted to skip the above step, don't do it, I have and it always costs me time later, this is not hard to do, and netcat is on almost every Linux server and OSX, you can also get a windows version, so you have no excuse. If you cant get connectivity you have narrowed your problem down to either an Operating system problem or a true networking issue. If you narrow it down to an (3) application layer problem, I recommend using the same technique as above but substitute netcat for the real server. Still using telnet as the client. The nice thing about telnet is you can type or paste most simple text based protocols right into the command line and allow you to diagnose the issue. Another technique to diagnose application level problem is using tcpdump and Ethereal. Here is an example tcpdump using netcat listening on 1234, and telneting and typing on one line "joel is cool" root@joelslinux .ssh]# /usr/sbin/tcpdump src port 1234 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 20:34:38.007751 IP 192.168.0.35.1234 > 192.168.0.102.54490: S 1214955266:1214955266(0) ack 1626693439 win 5792 joel is here now 20:34:43.166928 IP 192.168.0.35.1234 > 192.168.0.102.54490: . ack 19 win 1448 20:34:49.286864 IP 192.168.0.35.1234 > 192.168.0.102.54490: . ack 24 win 1448 ????20:34:53.391475 IP 192.168.0.35.1234 > 192.168.0.102.54490: . ack 29 win 1448 I will not go into detail as to how to read tcpdumps here, but to learn about them go here. (4)Operating System Issues: Sometimes network problems are in the local operating system. It could be running an OS level firewall (check that first). Also it could be a permission issue on a user not being able to get a file handle, too many sockets. Use netstat to troubleshoot these types of issues. Finally it could be a routing problem , sometimes depending on the number of NIc's in the box and the complexity of the networking the routing could be setup so the default route sends you to la la land and not where you want to go. You should get an SA to help you check your routes, or try to get to your destination on another protocol or port and if that works, you can usually eliminate that its a routing issue. Finally the networking could be misconfigured, the netmask, the ip address etc could all be an issue. (5)Real Networking Issues: When it is a real networking issue it could be one of many things, don't always assume its a firewall issue, it might be but it could also be, a bad cable, a bad network jack, a router issue, load balancer, quality of service device, or one of many more. The best thing to do when communicating to network engineers is say its a connectivity issue and you have no idea where. If you say its a firewall issue, they may think you know what your talking about, just check the firewall and say its fine and get back to you saying its not the problem. If you say its a connectivity issue the will often help you troubleshoot it using some of the same tools as above while they watch the various network devices. Also its important that you tell them where the machine is located. In a typically production configuration there is front office boxes and backoffice boxes. If you are trying to get out to somewhere in cyberspace from the front office boxes you will typically NAT out through the front side firewall or load balancer if you are using that instead. If you are in the back office you will often NAT out the backside firewall which is between front office and back office. (6)Performance Issue: (6a)NIC Issues: Lots of time this can be a NIC issue, first thing is to check your two boxes using mii-tool. [root@joelslinux .ssh]# /sbin/mii-tool eth0: negotiated 100baseTx-FD, link ok This shows im running 100mb full duplex ethernet on my box, so if this is the expectation then im fine. Most of the time the issue is your running half duplex. Sometimes the NIC thinks everything is fine but the negotiation on the router is an issue. In this case you will need a network engineer to look a it. (6b)Reverse DNS on webservers Most web servers will try to log connections from the source, and standard log file configuration wants the web server to do what is called a reverse dns lookup (equivalent of dig -x IP). Not all servers have reverse IP dns records, also called .addr.apra records. If DNS is misconfigured on the server, this can cause connectivity and performance issues of clients trying to connect because the web server will not hand over control of the socket to the protocol handling code until it has written its log record, in order to write the log record it needs the reverse dns record. In this case we cant punt on the DNS issue because we don't usually know what IP's will be connecting to the server (if we do we can still use the /etc/hosts trick described above), but if not we will have to fix DNS. Here are some simple steps: cat /resolv.conf if there are more than 1 entries coming back, try commenting out each entry 1 by 1 and doing dig commands in between and seeing if DNS responses start coming back or start coming back faster. If there is only 1 server, do a dig and if the response doesn't come back or it comes back slow you will need to get the server fixed or find a new DNS server to use. So that's it, my 6 simple steps to troubleshooting connectivity issues. I will update this and fill in the stuff I forgot as I remember.

6/02/2006

 

My MacBookPro arrived...

My MacBookPro arrived on wed while I was at work, so its been some late nights playing with my new toy. This is my 3rd mac in about 1 1/2 years (I never owned an apple before then). This is far and away the coolest one so far. Its very fast, and it runs tiger (I have to stay on Panther on my work computer due to vpn) and its intel based. The very coolest application is parallels, its kind of like vmware for mac. It runs very nicely and very fast, you dont need to dual boot with bootcamp, you just create a virtual machine, give it some memory and install windoze. I have still a few apps that need to run in windows (ms money and slingbox), so this is cruicial. When I first put it in fullscreen I was kind of dissappointed, it looked kind of fuzzy and not great, but I finally RTFM and installed parallels tools, and now its crystal clear and just as nice looking as my mac osx. Cant wait to try burning dual layer dvds, but for now I need some sleep. Also there is a version of eclipse that works on mac/intel (needs recompile due to jni in vm), use version 3.2 rc6 or better.

5/17/2006

 

Since several people have asked...

Since several people have asked. Yes I have lost a bunch of weight. My weight as of this writing is 199. On January 1st, it was 238.8. The reason for my sudden weight loss after years of being a proud fat guy is my cholesterol was too high and my Doc was going to force me to start taking drugs. He said I could diet also but the suggestion 1 year earlier hadn't yielded much results. The diet he suggested was southbeach, it was created by a cardiology for the specific purpose of better heart health. After 3 months on the diet here are the blood results:
beforeafter
total250 196
bad(ldl) 179 137
good(hdl) 71 46
crreativp BAD NORMAL

5/15/2006

 

nylundproperties.com a family venture...

nylundproperties.com is a new family venture we have founded to buy exceptional properties & houses and resell and rent them to the public. We are just getting started, but expect great things in the future. Right now we have an awesome property lakefront on Smith Moutain Lake in Virginia. If you have never been to this lake, it is a fantastic family vacation spot for the summer, or a great place to retire.

3/26/2006

 
Pinch me, I must be dreaming..... What a weekend, It started friday afternoon... I was feeling sorry for myself because my School was in the sweet sixteen just 30 miles away and several people I knew were going and I wasnt. I called my wife and we agreed we had to go for it, so we plunked down way too much money for 4 tickets from one of these scapling sites to friday's game against Witchata State, the boys had a great time, we were in the nose blead section right in the middle of the Witchata State section. Well we won that game, it was a great time.
To my suprise when I woke up Saturday morning, a good friend had helped score me some tickets from a great guy whose team had lost (Im also a UofW fan, since Dad is a grad and most of the family is from seattle area), but was luck to benefit. The seats were awesome, front row, almost at half court, really they couldnt be any better. So we are going to the final fourbaby ..... what a weekend..........

12/23/2005

 
Joel's Baked Potato Soup Ingredients for Single Batch (enough for 4) 4 large baking pototoes (or 5-6 small ones) 2/3 cup butter (1 stick + 2 1/2 tsp on 2nd stick) 2/3 cup flour 1 1/2 quarts of milk (use 1%) (6 cups) 1 cup fat free sour cream (8 oz) 4 green onions chopped (I use about 1/2 of the onions) 5 ounces of cheddar cheese, grated salt pepper optional bacon or bacon bits Ingredients for Double Batch (enough for 8, I always make this way) 8 large baking pototoes (or 9-10 small ones) 1 and 1/3 cup butter (about 2 and 3/4 (up to 6tsp line) sticks of butter or marg) 1 and 1/3 cup flour 3 quarts of milk (use 1%) (3q = 12 cups) 2 cup fat free sour cream (16 oz) 8 green onions chopped (I use about 1/2 of the onions) 10 ounces of cheddar cheese, grated salt pepper Directions 1.)Bake pototoes at 425 for about 1 hour, should be tender but not too tender (all over medium heat) 2.)Melt butter in a medium (or large if double) soup pan 3.) Slowly blend in flour with wire whish until blended 4.) Add milk slowly stiring all the time 5.) Add in salt and pepper 6.) Remove peels and add potatoes slowly (if you like peels, cut the peel of 1 potato into small pieces and add now) 7.) Add green onions once everything is hot 8.) Add sour cream and heat again 9.) Add cheese slowly until all melted 1 hour to cook potato, 30-40 min to cook soup serve with more cheese on top and optional bacon, also add salt & pepper to taste.

12/22/2005

 
Its funny when business guys are starting to forward me articles on how java is dying and Ruby (and or Ruby on Rails) is the next great thing. So given all the hype I downloaded (or tried to download) Ruby on Rails. Since I have a mac, I downloaded locomotive which is a prepackaged verion of Ruby & Rails for the mac. I have started to play with it and I can say if you have a simple table in MySQL and you want a webapp that allows you to do crud on that table with as little work as possible this seems like a good solution. Rails seems to rely on convention to keep things simple. I haven't been doing much web based work lately (mostly focused on b2p apps), but I tinker around for fun sometimes. Anyway since I have been doing java for a while now (9 years wow!) I was wondering if someone was doing the same thing using the java language instead of Ruby (I have nothing against ruby, I was a smalltalker before Java and am a fan of most OO languages, which Ruby is. Looking around its hardly clear the answer, there appear to be 2 or 3 of these out there, Sails was the first I found. Then I found trails which seems a little farther along (at least from the movie). Finally there is Grails (how many cheesy rhymes can we come up with to Rails) which is a Groovy version of Rails. Thats all for now, I plan on playing with all of these over the holidays before I draw any conclusions.

12/12/2005

 
The Most Expensive $600 machine I have ever bought (this is a long boaring story mainly to document my stupidity so I wont do it again) Its funny how one thing leads to another.... I had been trying for years to port Gallery (my picture web page manager program) from windows to Linux, so I could stop running windows as a server and just have my Linux box as the server for external stuff. They finally came out with a version that has MySQL backend and is reasonably easy to port to Linux. This was a major effort that took many long hours and late nights, but I finally got it to work. Then I realized that old Pentium 400mzh with 392m of memory and 40 gig hard drive just wasn't good enough. With fedora core 4 installed and running apache & MySQL, there was little room for performance of my 3000 picture gallery. So I convinced my wife that it was time to buy yet another machine (I already have 1 Mac mini in the basement on the big screen, 1 new Pentium in my office, 1 new laptop in the kitchen, 2 older boxes running win98 for the kids, and the old Linux box described above). My brother and I went to the computer show in Chantilly and I bought a cool AMD box with a very fast 64 bit processor, a gig of ram, 200 gig hard drive and video, sound and network cards all for $600 bucks. So anyway, now to the fun story....... I installed fedora core 4 without any issues and started up apache & MySQL. Then I exported my old gallery dB and tarred and copied all the files over (this took 2 late nights). I noticed Linux had restarted once (didn't bother to look at this system messages) and went on with my life. I then tried to get my new gallery install working and with much drama it kept breaking while on the final step. I posted several times to the gallery forums and got much help from the nice folks there and tried just about everything I could imagine (another 5 late nights). Then I asked my good neighbor John for some help since I was getting some weird file system errors that said file system was read only on part of the drive. He looked at and suggested possibly and issue with the disk as these types of issues don't typically happen on Linux with the file system I had used. So best buy is up the street, and I went and bought a 300 gig hard drive (for $69 after rebates but $169 cash). I put in the new drive and thought now the answer to all my troubles, lets reinstall fedora core 4 and life will be good. But the install for fedora core 4 kept crashing 1/2 way through. I tried this 5 times or so and then my neighbor suggested testing the media or using his. I tried both, and later learned that testing the media on fedora hardly ever works. I also tried installing from CD instead of DVD. No luck and almost 20 attempts at install. I also was in a rush to instlal the drive and cable select didnt work, nor did master on the cable that was there, so I put in a 2nd cable and used cable select on that. Thinking this could be confusing fedora, I put it back on the other cable and as slave it worked. The cable had labels for master and slave and they were backwards, the DVD was labeled slave, but was the master and the hard drive was labled master but was the slaved. Anwway the bios was cool with it, so I thought what the heck. But that didnt work either, so I played guessing games with the $39 undocumented DVD drive jumpers until I made it cable select and put the hard drive on cable select, now finally the bios matched the little labels on the cable and everything was on the one orginal cable. Well suprise that still didnt work (another 2 or 3 late nights). I was beginning to give up when I stumbled on memtest86 which is a nifty little tool that tests your memory. I ran it and it quickly identified numerous errors. I was a little nervous, so I went and got the latest version and tried again and it still found a ton of errors. So it recommended pulling the memory module's one at a time and seeing what happened. Of course I pulled the 1st module and there were still errors, then I pulled the 2nd one and put the other back in the first slot, and wala no errors. So then my 21st install of fedora worked on the 1st try (or 21st try) and everything else worked like a charm (Still another full day of work on and off). I called the vendor and they said I could send the $50 module back to them and they would send me a new one, hardly any consolation after all this. So the moral of the story is..... a.) Im a sofware guy and should leave the hardware issues to big brother (the EE) b.) I should start buying pre-installed linux ready boxes from the web that have all this crap already setup and send it back when it doesnt work. c.) I should keep learning by screwing things up and keep a sense of humor about myself. d.) all of the above

11/26/2005

 
What kind of CD's & DVD's to buy? That is the question santa will be asking himself this christmas for stocking stuffers, I have so many machines and burners he is probably spinning his head this year. My new toshiba laptop only likes the DVD+ stuf, DVD+R (8x), DVD+RW (4x), DVD+R (double layer 2.4x). For the CD's it only likes CD-, CD-R(24x), CD-RW(10x). My mac mini, writes DVD-R discs at up to 4x speed, writes DVD-RW discs at up to 2x speed, writes DVD+R discs at up to 4x speed, writes DVD+RW discs at up to 2.4x speed, reads DVDs at up to 8x speed, writes CD-R discs at up to 16x speed, writes CD-RW discs at up to 8x speed, reads CDs at up to 24x speed Now, I think my powerbook is a little differnt drive, I think it does DVD-RW and CD-RW, im not sure how fast. (not sure when they started shipping the double layer drives). Now I have an old cd burner and an old dvd burner upstairs, im not sure what either of those do, but I doubt I will need either. Chalk up one more kudo for good usability on the mac that they made it work with either.

11/23/2005

 
Mom's Thanksgiving Feast My mom is one of the greatest cooks in the world, and her thanksgiving feast is loved by all that have had the chance to try it. This year (2005) mom is traveling to Israel for a religious pilgrimage (of the Catholic nature). This gives myself (and my sister in law Kelly) a chance to make turkey dinner at our own homes. Thanks to Kelly for watching mom do this on our pre-thanksgiving feast and documenting it, here are her notes. Stuffing (Amounts for 1 bag of stuffing mix – she used 2 bags for the two turkeys) 1. Get the stuffing mix that is not too fine/crumby – should be a bit chunky 2. Melt 1 stick of Parkay margarine in a frying pan (might only need ½ stick for one bag – I can’t remember!) 3. Add in ½ cup of finely chopped onion. Cook 5-7 min (not too high – don’t burn) 4. Pour stuffing mix in BIG bowl. 5. Add cooked butter/onion mixture to stuffing. 6. Add approx 2 cans of chicken broth a little at a time. Want it soft, but not too soft. 7. Add poultry seasoning, sage, salt and pepper to taste. 8. Mix well and put in fridge or on counter to cool. Stuffing needs to be at the same temp as the bird when you stuff it. (so make it ahead) Turkey 1. Clean out your sink REALLY well. Have a bunch of paper towels handy. 2. Put turkey in sink and wash it well in cold water, both inside and out. (take neck, etc., out of inside and check under wings for yellow gunk) 3. Pat dry with paper towels both inside and out. 4. Salt (Hawaiian salt) and pepper inside of bird (both cavities). 5. Put stuffing in bird (in both cavities – one at each end of bird). Pack it in! 6. Close and secure skin flaps with short metal skewers. (can get at grocery store) 7. Rub olive oil all over bird. (top and bottom) 8. Salt and pepper outside of bird. (top and bottom) 9. Put in roaster pan wings side down. 10. Cook in a roaster with a lid, or can buy a disposable pan and use foil to cover. 11. Cooking temp and minutes per pound should be on turkey package. (Approx 325 degrees and 15 min/lb) 12. Remove cover/lid last 30 minutes to brown turkey. 13. Turkey should sit 15-20 minutes before carving. 14. Can cook neck/giblets in water on small pot on stove for broth for the gravy. Gravy 1. Save water from cooking of potatoes. 2. Save water from cooking of neck and giblets. 3. Remove turkey from pan. Use fork to loosen drippings. Take any really big scraps out of pan. 4. In a small glass jar, make a mixture of cold water and cornstarch (1/2 cup each). Shake jar to mix. After mixing, a little more water may fit in the jar. 5. Put turkey pan/roaster on stove burner to heat up drippings. 6. While pan is on stove, whisk in cornstarch/water mixture and approx 2 cups potato water. 7. Cook until thickened, stirring almost continuously. Can add some giblet water if it gets too thick (or canned broth). 8. Add salt and pepper to taste.

 
Its turkey time of year again, here is a recipe I saw on the today show somtime in 2004 with Chef Jamie Oliver, im copying here in case the link goes away. Please try to read the recipe at this link first. I made this one weekend with some modifications and it was great. Roast Turkey Serves 6 to 8 The big problem with cooking turkey is that the legs take longer to cook than the breasts. This means the breasts dry out in the oven waiting for the legs to catch up. In this recipe, I push sage and apricot stuffing up under the turkey breast skin, increasing the thickness of the breasts so they take the same time to cook as the legs. The result? Juicy turkey all round! Some people brine the turkey, some people don't. Personally, I like to rub the turkey with table salt inside and out and put it in a clean plastic bag and refrigerate it overnight (12 to 24 hours). This removes all the excess moisture and allows it to cook beautifully. 12 small fresh rosemary sprigs, plus few extra At least 8 cloves of garlic, 2 peeled 6 strips pancetta (smoked bacon) 9- to 10-pound organic free-range turkey 4 shallots, roughly chopped 2 carrots 1 big orange Olive oil 1 teaspoon flour 1 quart or vegetable stock, for the gravy A little white wine or sherry (optional) Preheat the oven to 350ºF. To prep the turkey, rub it with salt inside and out 12 to 24 hours before cooking; table salt is fine. Store the salted turkey in a plastic bag and refrigerate. When ready to cook, rinse or wipe off excess salt. Pat it dry with paper towels and place on a board. Make a bed of roughly chopped shallots, 6 unpeeled garlic cloves, and carrots in your roasting pan to act as a rack. Slice the strips of pancetta in half and slice the peeled garlic into thin slivers. Place a rosemary sprig and a garlic sliver on one end of a strip of pancetta and roll it up tightly. Repeat with the other pieces of pancetta until you have 12 little rolls. Stab the thighs and drumsticks of the turkey in 6 places on each side. Push your finger into each slit to create a gap. Place each pancetta roll into the holes until it just peeps out. Find the edge of the skin at the turkey neck and with a rubber spatula or large spoon separate the skin from breast meat so that you can put the stuffing under the skin of the turkey breast. If you're careful you should be able to separate all the skin from the meat, keeping it attached at the sides but without ripping any holes in it. From the neck end of the turkey, spoon the stuffing up between the skin and the breast, tucking the flap of skin underneath to stop any leaking out during cooking. Microwave the orange for 30 to 60 seconds to get it nice and hot. Poke a hole in the hot orange and stuff it into the turkey cavity. You can also add some rosemary to the cavity. Place the bird in roasting pan filled with the vegetables, season well with salt and pepper, and rub olive oil all over. Weigh the stuffed bird, cover with foil, and roast for 18 minutes per pound, or until the juices run clear from the thigh if pierced with a knife or a skewer. Remove foil for the last 45 minutes to brown the bird. Remove the turkey and rest on a board for 20 minutes. Remove most of the fat from the roasting pan. Mash the roast vegetables right in the pan with a potato masher. Add the flour, sherry and stock and bring to a boil on a high heat. When the gravy thickens, strain into a bowl. Serve the turkey with the gravy.

11/04/2005

 
Its not building software that is hard and time consuming, its building software that is scalable, maintainable, stable, operational, secure, multithreaded, extendable and reliable thats takes time and is hard. One of the BIGGEST problems today in software engineering is that at first glance to a business person they cant tell the differnce between a hack and a well engineering piece of software. The bigger problem is the Software Engineers (not sure they are worthy of the title) that propagate this notion. I dont know how many times I have heard (and even said myself), well I could crank that out in a good weekend. Lets take a little monitoring program that I wrote today as an example. The requirements are simple, take a list of urls and check them every so often and see if they have changed. Well I cranked this bit of code out in about 40 minutes (I dont code much, I suspect it would have taken 10 a few years back). Then I started thinking about all the error conditions, the logging, the scaling, what would I do if I want to make ports configurable, how I am going to have it run, how it will alert, but not too many times, what if I get a 1000 urls, will this little program work anymore, will the machine run out of disk space if I leave it running for 100 days. I think I could spend another 20 hours on this to get it where I want. The point is something that could take 10 minutes to write, could take 20+ hours to get right for production. Anyway, the next time you think about how long it takes to code something, think through all the things above and make sure you are clear in your answer....

9/19/2005

 
sockets in TIME_WAIT If you have one load test client, then you have 60k unique socket combinations. (socket is unique combination of clientIp:clientPort:serverIp:serverPort, in most applications serverip and port are constant for one server) On linux the default tcp_fin_timeout is 60 seconds. The math is 60k/60 = 1000 tps If you exceed 1000 tps then you theoretically could have fin wait issue. If you simply add one load gen client then the number of tps doubles and so on as many client boxes as you add. So the real issue is how fast are your client load generating boxes and can they get to 1000 tps. This is usually a real production issue since you will have traffic coming from many different ips to many other ips and not likely more than 500tps from 1 ip to 1 of your server for many applications. However with More's law more and more single servers are going to be able to handle this load and there are probably many apps where most of the traffic could come from 1 or 2 big customers. In this case you need to look at lowering this timeout (echo # > /proc/sys/net/ipv4/tcp_fin_timeout)

9/16/2005

 
Im trying to figure out what im doing wrong, I have setup blogger to notify weblogs and also post an atom.xml file for anyone that wants it. I have notified several search engines that my blog is there, but I cant seem to find it in any of them. Lets hope this try works, here we go.....

8/24/2005

 
to do a grep that says give me the lines that dont contain noththisstring do: grep -v notthisstring

7/12/2005

 
What I learned at JavaOne 2005 EJB 3.0 is cool, they are using annotations to do all the repetitive work for you that people thought was cumbersome (I think this was overvblown, but its still cool). It also is using all the spring ideas & hibernate ideas (including IOC, hadnt heard this before javaone). XML Processing and performace - main thing out of this ssession was that if your just parsing some xml to put into an ojbect doing some processing and then turning an object back into some xml, dont use dom or sax, use jaxb or xmlbeans. Probably a big DUH for me, but the lightbulb went off Chasing 9's Modeling & Measuring Availability of J2EE Applications - wasnt the greatest session, but they had some interestign theory on availability. I seem to have lost my notes on this one, Ill try to get the slides. The main point here is they said they proved the Iplanet app server is 5 9's, of course they worked for sun. Glashfish is sun's open source j2ee server, I think it is based on IPlanet, very interesting implications for jboss and geranamo. Achieving Great File I/O performance in java - this session was done by the BEA guy that worked on JMS in weblogic 9. His quest was to get the most robust and best performing file based persistence impl. Key things out of this is buffering up writes for performance and realizing that most filesystems dont commit writes (there are commands that can force a write depending on which type of writer you are using. Also the best performing way to write is called direct i/o which you cant currently do in java, so they wrote a c version for each os and jni. AJAX - is a very cool technology that is built into browsers that allows you to have dynamic content via javascript with serveral calls to the server without the page reloading. Google has made it famous with google maps Grizzly is a java nio connector for Glassfish, its appears at first glance to be a good start at a nio framework, still need to look at it. Six ways to get out of memory error - was a very good session, here are the 6 ways in summary: 1.) memory leak, maybe slow leaks that take days or weeks to show up, in mustang cool feature java -xx +HeapDumpOnOutOfMemoryError 2.) Heap is not big enough - you just dont have enough memory to store what your app needs. 3.) My perm gen is full - I think I ate too many classses - perm gen space (new 1.5) in stack, 1.4 & before not. Jdk 1.5 has jmap perm option. 4.) Hand over your swap space vm aborts, crash, hang, weird behavior, could be jni code cant malloc, basically the idea here is you requested x bytes and the os cant give it to you. 5.) The evil finalizer - finalizers can delay garbage collection, if lots of code being executed on multiprocessor system this is more liekly. dont use finalizers. To diagnose, use jconsole mbean tab/summary # obj pending for finalizer 6.) long lived jni critical section - gc cant happen during jni critical sections. Beyond Bloggingg, Feed Syndication and Publishing with Java - in java there are 2 competing tools ROME from sun and FeedParser from rojo.com. ROME is dom based, FeedParser is sax based, it looks like feedparser is more mature and faster but ROME is being run by sun.

3/26/2005

 
A good recipe for Chicken Tortellini Soup 6 chicken thighs (about 2 1/2 lbs.), trimmed of excess fat 2 t. vegetable oil 2 carrots, diced 2 stalks celery, sliced 1 large onion, chopped 1/3 C. soy sauce 1 9-oz. package fresh or frozen cheese tortellini Brown chicken in hot oil in Dutch oven or large saucepan over medium-high heat. Remove chicken from pan. Drain off excess fat, reserving about 1 tablespoon. Add carrots, celery and onion; sauté 3 minutes. Stir in 5 1/2 cups water, soy sauce and chicken. Bring to boil; cover and simmer 15 minutes. Remove chicken; cool. Meanwhile, cook tortellini according to package directions; drain. Remove skin and bone from chicken and cut meat into bite-size pieces. Stir chicken into soup; bring to a boil. Stir in tortellini and heat through. Makes 4 to 6 servings from thatsmyhome

1/17/2005

 
I finally got samba working on my home network. I remember trying a few years ago and it wasnt very easy. Now there are some pretty good directions here. So I dont forget, here are the basics: - smb.cnf is in /etc/samba (this is the config file for samba) - to start/stop/restart /sbin/service smb restart - you have to create smb users to match your unix users (I think)

1/13/2005

 
One of my pet peeves is engineers who work on database and oltp systems but don't have any clue about transactions and isolation levels. Also no clue about pessimistic locking (both in the database and at the application level). I just had a good discussion about the default isolation levels of various rdbms systems with some engineers I work with and I couldn't easily find the answer on google, so IM putting here the gatherings from a few spots. SQL SERVER - READ COMMITTED Oracle - READ COMMITTED (supports only READ COMMITTED, SERIALIZABLE and the non-standard READ ONLY) DB2 - REPEATABLE READ (supports REPEATABLE READ, UNCOMMITTED READ and 2 non-standard levels) PostgreSQL - REPEATABLE READ (only supports REPEATABLE READ and SERIALIZABLE) Mysql InnoDB - REPEATABLE READ Sybase - READ COMMITTED Chapter 3 of this book has a good explanation of how to do optimistic locking in your application.

12/31/2004

 
This is very cool, my parents gave me the Garmin Forerunner 201 GPS watch for christmas. This is the coolest new piece of geekness I have received in quite some time. So I went out today for a test run, it was a pretty slow mile (to much eating over Christmas), I went out my back door and down the trail that leads to goose creek and along the creek to the end of the trail and back. It was 1.2 miles. So this is all very nice, but I can show you just how cool the watch is now. The watch comes with a serial cable that you can hook into your computer and it gives you a log book and report of what you just did. Here is a picture of my first run: Now this is cool in itself, but I found something better, there are some great instructions at a web site (click to see) that show you how to map your logfile data. Here is the teramap of my run: not too exciting since its a fairly old map, showing just the creek and not much else, or neighborhood is pretty new. I cant wait to try this out next time I visit a big city like sanfran or london. Ill be sure to post my future runs..

10/28/2004

 
I have been looking at writing a java server that can handle thousands of clients, nio provides some promise, but there is also a library from ibm called async io that is interesting. This is a cool site that pretty much covers it all, they are a little out of date on java.

9/28/2004

 
by default linux limits the number of threads per process to the variable below /proc/sys/kernel/threads-max

8/30/2004

 
Im helping another friend with his website, its http://www.blackeaglelimo.com/ , if you want a limo, I recomend trying there service.

 
to disable a class or method from being jit'ed in an ibm vm use: export JITC_COMPILEOPT='SKIP{java/media/api/ParameterBlock}{*}' will skip compilation of all methods in the ParameterBlock class. Youcan use standard shell regular expressions including range [], singlecharacter ? and multiple character * operators to narrow down theclass and method causing the problem.

8/21/2004

 
Mom’s Enchiladas Ingredients: - 2 cans Old el paso enchilada sauce (10 oz) - 1 can Old el paso chopped green chiles ( 4.5 oz) - 1 lb ground beef (or turkey or sausage, or turkey sausage) - 1 can mexi corn - grated cheese - 12 corn tortillas Directions: - cook meat in skillet until well done - put mexi-corn and chilies into meat pan along with ½ can enchilada sauce and mix to make filling. - pour 1 can of enchilada sauce into pan (9x13 pan, 1 inch deep) - nuke tortillas for 20 seconds to soften, then dip tortillas in sauce - fill tortillia with filling and roll, place in pan. - Fill pan with tortillas - Pour remaining ½ can sauce over top pur remaining filling over top - Cover in cheese - Bake at 350 for 45 minutes (60 minutes if in fridge)

7/31/2004

 
I just helped a friend get his website online, its www.delisouth.com , its a great deli in leesburg. My favorite is their breakfast bagel sandwiches, you really should try them if you havent.

6/11/2004

 
to create ssh keys in linux: ssh-keygen -t dsa it generates a .pub - public key and a file (you pick name) with your identity usually you put them in your home .ssh directory and call them identity.pub and identity.

5/31/2004

 
I spent some time reading Mastering BEA WebLogic Server tonight (since I forgot my work laptop, not tempted to do email), this is a really good bood. Some items to note for future quick reference: Linux tunings (I knew most of these,but good reminder) sysctl -w ip_ct_tcp_timeout_time_wait=60 edit /etc/sysctl.conf (add fs.file-max=20000) (weblogic is your user) edit /etc/security/limits.conf (add weblogic hard nofile 8192) ulimit -n 8192 Some things to add to a todo list to any good weblogic deployment: - write a reset pool script that can be called by an SA in the event of database failover, or better have it automatically called when the server completes failover. - idempotent is on by defaults, hmm, think about this some - in 8.1, weblogic has native io, java muxer and now nio muxer. Need to figure out if the nio muxer is supported yet for non ssl servers. Wont be SSL until 1.5 at least.

1/15/2004

 
There is now a group working on open source java nuke (content management system written in php). The site is here. Looks like it has a way to go before its done, but the basic stuff is up there.

 
If I ever get a chance to run a large company, one thing I should think about is the issue of making autonamous business units that are responsible for their profit/loss, but also leveraging the corporate economies of scale. For example corporate decisions that are made effect the productivity of the business units along with the environment. This can be negative or positive depending on the deltas between the various business units.

1/08/2004

 
yahoo, the coach is back!

 
to restart linux networking use "/sbin/service network restart"

12/15/2003

 
I am starting to type in the story of "Santa and the Ice King" by eLucrece Beale. You can see it here on my website.

12/05/2003

 
this is my first entry to my blog, im not sure what to put here, but what the heck, this looks like fun.

Archives

This page is powered by Blogger. Isn't yours?