A C Sharp Coder's WorldA C Sharp Coder's WorldA blog that talks about programming issues from a programmers perspective. Articles
Problems with learning to code through code reuse
2007-02-05 16:21:00 I've come to the conclusion that while code reuse is a great thing to speed up development. It does not allow developers who are trying to learn a new skill to truly learn that skill.An example would be that developers are continuously using String objects instead of StringBuilder objects when doing multiple concatenations and modifications. They have no idea why their code runs slow. You can't learn something if you don't take the time to understand it. So a lot of beginners do not know why StringBuilder is better than a String, or that in some cases just the opposite can be true, or what to look for on deciding which one to use. Some even have no idea on what immutable means.There appears to be some disconnect these days with users who don't care to learn the basics. Part of this is due to the fact that you can build something with .NET so easy, and you don't have to know the inner workings. I find this very disheartening. Everyone wants short cuts but when you bypass ... More About: Code , Problems , Learning , Earning
No Oracle DLinq Support
2007-02-02 18:31:00 Recently I had a chance to play around with DLINQ that came out in the "Microsoft Visual Studio Code Name “Orcas” - LINQ CTP (May 2006)". I was blown away by the ability to create a Data Access Layer with out writing a single sql statement.DLINQ stands for Database Language INline Query. What this means is that we no longer have to write sql statements as strings but can compile them as constructs of the application and let the provider module build the proper query for us at execution time based on the IL that was generated. Seeing this in action was unbelievable.I spent a good bit of time reading all the material and examples and just couldn't wait until I could try it out with Oracle . It didn't take me long to determine that there was no Oracle support built in to the product. The reading that I did did point out that there is a framework in place for any provider to create their own LINQ module. As of yet, I have found no information stating that Oracle is or plans o... More About: Support
.Net 2.0 and JavaScript
2006-10-24 15:52:00 Up until now, most sites built by ASP.NET developers have had post-backs to manipulate the user interface to provide some feedback to the user. This was probably due to the lack of JavaScript knowledge. Due to recent activity on the use of AJAX, its hard not to need JavaScript in almost any web site today. This brings me to my discovery.I have been working on a project and my clients most recent request has been to eliminate page refreshes due to post-backs. Of course I said no problem and went about the process of using the ICallbackEventHandler interface to utilize what .NET has provided. To do this requires the writing of many JavaScript functions, which almost all need some reference to one or more controls on the UI. No big deal you say. That's what I said when I started this process. Then I realized that all of the controls have a an ID on the server and an ID on the client side which are different. The problem arose when I needed to reference a text field called "U... More About: Javascript
Leverage the C# Preprocessor
2006-06-23 21:06:00 Leverage the C# Prep rocessor: "Like other languages in the C-family, C# supports a set of 'preprocessor' directives, most notably #define, #if and #endif (technically, csc.exe does not literally have a preprocessor as these symbols are resolved at the lexical analysis phase, but no need to split hairs…). The #define directive allows you to set up custom symbols which control code compilation. Be very aware that unlike C(++), C#'s #define does not allow you to create macro-like code. Once a symbol is defined, the #if and #endif maybe used to test for said symbol. By way of a common example:#define DEBUG using System; public class MyClass { public static void Main() { #if DEBUG Console.WriteLine('DEBUG symbol is defined!'); #endif } }When you use the #define directive, the symbol is only realized within the defining file. However if you wish to define project wide symbols, simply access your project's property page and navigate to the 'Configuration Properties | Build' node ... More About: Leverage , Process
Cozumel: Day 7
2006-06-21 04:51:00 We again awoke thinking we slept late only to find out that it was only 8:30 here. We took care of some blogging for yesterday and by the time we new it it was already 11:00. So we got ready and headed to the beach for some lunch at the beach club where the view is always good, as you can see. We did our part in devouring the food from the buffet including some extremely spicy stuff that Ray found. It didn't look like it should be that hot since it looked green, almost like it was jalepenos, only a lot more spicy.After that we went back to the room to change for the beach. I guess we aren't that bright since neither of us thought to put our bathing suits on before we went to eat next to the water. Either way we made our trip back to the water, got a palapa, and headed to get a hobie cat. Both of the boats were already out so we thought we would do some kayaking in the ocean. Again, neither of us are that bright because that was like the worst choice. That was no fun at al... More About: Cozumel
Cozumel: Day 6
2006-06-20 04:53:00 We woke up feeling we slept later than usual only to find it was 8:30 and that we had 2 hours until the boat was coming to pick us up. We got dressed and headed to breakfast at La Posada yet again, as its the only one open for breakfast. We had some of the usual suspects and returned to the room to finish getting ready for the day.It was now 10:00 and we headed to the pier to wait for the boat. We gathered our beach towels on our way there and began our wait. We strolled the beach looking for shells and things while we waited to help pass the time. Finally the boat arrived. The guy on the boat asked if we had our ticket and our money for the park fee, since the reefs are considered a national marine park. I went to get my wallet out of our bag and d'oh, I left it in the room. Ray told the guy it would only take her 5 minutes to go back and get it. You should have seen her run, those little legs were just-a-booking-it. Well she made it back in less than 5 minutes, gave him... More About: Cozumel
Cozumel: Day 5
2006-06-19 04:58:00 First and foremost, Happy Father's Day to both of our Dads out there!Well, we woke up this morning, and I wasn't feeling all that good, so Ray did some research and apparently it's Montezuma's Revenge. If you're not familiar with this term, well then I'm not going to give you the details, so you'll have to figure it out for yourselves. Anyway, we woke up late and started our day with lunch at La Posada, and with what I have, nothing sounded good.After that we went to get our Jeep so that we could head into town and check out the town's center. It was hotter than ever and our first stop was the Cozumel Museum. The museum wasn't the greatest but there were a few cool things that we learned, the Aztecs used rock deodorant just like me only a thousand years or so before me, and Ray liked the fact that the displays talked about pirates, Jean Lafitte in particular. We finished up the museum and headed to La Plaza, which is the local hang out with shops all around the courtya...
Cozumel: Day 4
2006-06-18 05:35:00 We woke up around 9:00 am with plans to try to rent a car for the day and checkout downtown. We first stopped to have breakfast at La Posada and then headed to the desk where they guy was advertising a $20 car rental yesterday. Apparently the catch was that you had to sit and listen to their timeshare sales pitch, so we got suckered into that. All in all, its not that bad of an idea, if you are typically terrible at finding good vacation package deals, but it would have just ended up costing us a lot more than just resort-hopping on our own. About an hour and a half later - after sitting in a room that didn't seem to have the AC working the whole time, after listening to a pitch that lasted quite a bit longer than it was supposed to, after a glass of water and three different sales reps - we were free to go with our car rental coupons.By that point it was too late to rent a car and get any good use out of it, so we decided to save it for tomorrow. Since we didn't really have any ... More About: Cozumel
Cozumel: Day 3
2006-06-16 15:52:00 6:00 am - the cell phone started ringing. We expected it to be the alarm we had set to wake us up for the day, but it was over 1.5 hours early and just kept ringing. Hello? Nothing. It rang again. Hello? It was Dylan calling to say "Good Morning" before heading off to his last day of Kindergarten. We tried going back to sleep to rest up for what should be a busy day, but to no avail - we were up for good at that point. We eventually got out of bed, dressed, sunscreened, and headed for breakfast at La Posada again. We had plenty of time to kill because of getting up much earlier than planned, so we took our time with breakfast, getting our beach towels for the day, and heading off to the lobby to wait for our ride to show up.Our tour guide showed up right on time at 9:30 am, showed us to our Jeep, and I hopped in the driver's seat and we sped off. We made one quick stop to pick up a few more people in another Jeep and we headed off to our first destination, Dzul Ha. Dzul Ha (pron. z... More About: Cozumel
Cozumel: Day 2
2006-06-15 22:43:00 We were woken up this morning by the tourism people at 8:30 am and said we needed to go ahead and make our reservation for the trip back to the airport on Wednesday. So we finally got ready and went to see them and had some breakfast from the buffet at La Posada. We then made our plans to go sight seeing tomorrow, which you'll have to wait to read about.Then it was off to the beach to have some fun. We got our snorkel gear and headed in to the big blue. It was a little cloudy the first 20-30 yards out but then it turned very clear. We saw thousands of fish swimming as a school and avoiding a barracuda that was at least 4 feet long, no kidding. They looked like the fish in "Finding Nemo" that made themselves into shapes for Dory. We also saw many tropical fish of different types and colors.We decided we had enough of the snorkeling for the day and went and got a Hobie Cat, which is a small catamaran. Ray said this could be our pirate ship, so I named it the S.S. Aaarrrrr. We ... More About: Cozumel
Cozumel: Day 1
2006-06-15 05:34:00 We woke up at 3:45 am to head to the airport, and by 7:00 am we were on our way to Dallas/Fort Worth. A quick stop and then the last leg to Cozumel . After arriving and pressing the magic Customs button, which we got a green light on, we were greeted by our driver and then off to the hotel. The driver found a way to pack 12 adults in a van and maneuvered it like Mario Andretti through the town. We turned off the road and discovered the hotel entrance was gated, woo hoo, just like home. We got out and as we entered the main lobby, we were greeted with a glass of bubbly while we waited to check in.Well, after the lack of food on the flights, we were starving and headed to the first buffet we could find. Two plates later, I determined that that amount of food was not a good idea.We then decided to head to the beach. We had only 15 mins to snorkel, since the dive shop closed at 4:30. Within that time period we lost Ray's snorkel while trying to detangle her hair from the mask. Th...
Lucky Charm
2006-05-17 19:12:00 Every job has its differences and peculiarities due to the nature of the job and its environment. This is true for programmers. We can't really talk about our work to other people they way we would like to. Have you ever tried to tell any of your non-programmer friends or family about some new kick-ass cool library you built. Or the way you optimized some SQL statement that used to take 20s to run and now runs in only 20ms caused you found out it was doing full table scans. Well, if your experience is like mine, you might as well be talking to a chair. They stopped listening as soon as you mentioned a computer term they knew nothing about. Their eyes start to wander and you can just see that they don't care about your SQL statement that now only takes 20ms to run.Well this has been my life for many years now. Ever since I got my first computer and starting calling BB (bulletin boards), I've been boring the crap out of friends and family. I get all worked up about some I... More About: Lucky , Luck , Harm , Charm , Char |



