Posts

Showing posts from December, 2007

Microsoft LINQ

Ok so I'm working on a fairly large ASP.NET project for the federalies (I really can't say which agency). Right now we're pumping data to the app using datasets and saving with direct SP calls. This was fine when the app was in it's infancy. But we're rapidly hitting large scale volumes of users and this approach is limiting us in scope and scalability. Most people suggest going a pure OOD route and turning result sets from your DB into .net classes. This has to be done via an O/R (object relation) mapper that can take a number of tables, rows, columns into the correct collection of classes. I looked into some 3rd party solutions and most people suggest NHibernate. However NHibernate doesn't work with 100% stored procs for data access. And guess what we use nothing but stored procs to get data to/from the DB. So that option goes down the chute. Low and behold I find some references to LINQ from MS. I do some reading and found it's pretty bad ass.

I was a little hard on FF the other day

Ok so I was on a rant the other day about FF 3 beta. Yes it still sucks memory and it killed almost all of my extensions but after trying to use IE 7 fulltime, well urg. 300 MB with 2 tabs is still not good but well they're working on it I think. It's still a pretty good browser and I find myself using it. For those running 2.x I think you should stick with it until they get 3.0 ready to rock for the prime time. Also some guy from Mozilla posted on the blog and gave some links to look at. That's pretty cool and let's me know they care about issues with the browser. Pretty rad if you ask me.

FireFox 3 is still a memory whore

Image
So I installed the FF 3 beta the other day to see what coolio replacements it had. I was really hoping it would stop the annoying tendency of FF 2 to whore memory like no other. FF 2 would routinely grab 300 MB with 1 or two tabs open. I've read storied about it taking up to a gig but I've never see that on my machine. So after install almost all my extensions got killed. 2 made it through adblock and noscript. Not a good start, so I open like 10 tabs browse to various sites and then close back down to two tabs. The memory sucking is still there and it evens beats my visual studio! Overall it's been a pretty blah experience browsing with this new version of FF. I haven't noticed any new and great things from my upgrade to 3. I might actually go back to IE 7 if the memory whoring continues. I think FF hit its stide in 1.5 and has just gotten more and more bloated. Come on guys fix the memory whoring!

New software in unleashed!!!

Well it had to happen sooner or later. I have released a new version of the IP Viewer tool. It now hides from the alt-tab menu and runs quite a bit faster. For some reason it was hitting the .config file way to much. Now it keeps those values in memory until the settings get updated and then it re-reads them. Also Tile Puzzle 1.0 has been released. You can take an image from your PC and turn it into a tile puzzle game. It took me about a week of hard coding to get it working. It's pretty cool actually, it uses GDI+ to cut an image, and uses collections, and sorting methodology to manage the puzzle pieces. No source yet but the game is working pretty bad ass. Head on over to: JRL Software and check out the goods.

Cutting an image into sections

Ok so I'm working on an app that takes an image and cuts it into 16 pieces for a small puzzle game. The problem is how to do this. The solution is GDI+ to the rescue! I found some help on MSDN to eventually get this code. My puzzle needs to be 16 pieces and each piece is a small section of a larger bitmap. // get the piece width and height pieceWidth = _originalImage.Width / 4; pieceHeight = _originalImage.Height / 4; // clear the existing puzzle _puzzle.Clear(); for( int i = 0; i < 4; i++ ) { for( int j = 0; j < 4; j++ ) { Rectangle srcRect = new Rectangle( i * pieceWidth, j * pieceHeight, pieceWidth, pieceHeight ); // Create the new bitmap and associated graphics object Bitmap bmp = new Bitmap( pieceWidth, pieceHeight ); Graphics g = Graphics.FromImage( bmp );