November 2003 - Posts
My significant other and I had dinner with a long time friend of mine (grew up across the street from him) and his significant other and had an interesting discussion about one of his latest CS (Computer Science) projects that he had to work on. One thing that was interesting was how much he hated it. They had to design a 3D pinball game using Java. I told him that was the bad part right there...Java ;) But what was more interesting was that he bitched and complained about how one student in his group for the project had pretty much done nothing to help move the project along. As much as that stinks, in reality, there's really not a whole lot you can do about it, except have the satisfaction of knowing you did a good job and will probably make it in the real world where as s/he will probably get fired from wherever they work at.
One thing that just popped into my head about that is why not require each student to keep a daily blog of what they work on? At least some sort of journal or something. Then another student could challenge another student against more than just their word. Plus, I think that could also give some insite to the professors about how the students are going about what they're doing and possibly help them further. It could also just be one of those things that's there if it's needed and not necessarily looked at by the professor unless needed.
In the business management application that we use/created there's a similar idea: Time Entry. Each day I go in and add how many hours I worked for what company and a short description of what I did. This can help out both my boss to see what I've been doing (or lack thereof) and also in the possible circumstance of an unhappy customer who would like to know what all we did and when and make sure we're not buffering the hours, we can send them a nice report of what all was done and when by who.
Maybe there's some aspect of project blogging for college projects that I'm forgetting that would make it not really a good idea (hacking ideas from other students maybe, etc), but from my inexperienced (went 3 semesters before leaving) college aspect, it seems like a neat idea to me.
I picked up the Microsoft MN-700 Wireless 802.11g Base Station Router and got it installed. The management interface is fantastic and easy to use. I seriously would've had it installed in 10 minutes if it wasn't for an error on my part (read the wrong MAC Address that my ISP requires me to use). It was super easy to setup everything I need like Port Forwarding so I can TS into my box from work if needed.
It has 4 10/100 ports for your machines that don't have a wireless card in it (my main computer and my longhorn machine). It's backwards compatible with 802.11b so I can still connect to it with my TabletPC which has that built-in and is specially made to talk with the wireless adapter for XBox! :o
If you're going to be setting up a wireless network at home, this is my recommendation...awesome!
I had mentioned previously about being an “official” author in print now earlier. Thanks everyone for their congratulations. Roy had a good suggestion I should've thought of...which is talking about my first time experience with writing. Well, after going through a bit of it, I have to say I have more respect for those who do it. It's not the easiest thing in the world. However, that's one of the reasons I'm getting into it. I enjoy coding very much, but sometimes it's great to take a break for a few reasons.
- It's just nice variety from coding all day and all night. Helps keep my mind clear and focused.
- I enjoy a challenge.
- It helps keep my skills tuned. When you write, you really have to know what you're talking about, because someone out there knows just as much as you do and more. Plus, teaching someone else what you already know helps ingrain it in your brain as well as keep you on your toes.
- I get a lot of satisfaction out of knowing that I helped someone learn something (assuming I didn't do too bad of a job :P)
I had a nice talk with a fellow at Microsoft about writing and how there are really a few different kinds of technical writers (Scott Mitchell has also talked about this and it's very true). There are those that are naturally good writers that later on take on some coding. Then there are coders that later on take on writing. There is even a third group of people who are just fantastic at both. There are many of these people in the Microsoft community (too many to name names). I am definitely a coder that has come into writing. Both sides of the fence have a problem. We aren't experts at both ends of the rope. The people that are, well, I really look up to them and use them as goals for myself.
I have now written 3 articles (working on a 4th, 3rd will be published soon [on ASP.NET Templating and Skinning]) and two chapters for a book. All of them were unique experiences. My first article I wrote, I “thought” would be the simplest. It was on switching from Access to MSDE. Simple concept, but so many details I was unaware of beforehand. At this time I should also point out that editors are the greatest. They may seem a bit mean and pushy and want you to change too much of your work, but it's well worth it in the end. I think I was off and on editing that article for at least a month!
Next, I moved on to technical editing for Duncan's book, which was great. Duncan's a great author so he was pretty easy to edit for technical accuracy so it acted as a great intro to tech editing. If you ever get a chance, it's a great way to start. You get to see the process of writing without actually doing any of it.
After that I was offered to write the ADO.NET and DataBinding Chapters. It was a humbling experience, yet a great one. Number One lesson I learned was that it's important to span your time out when writing large amounts. I made the mistake of putting off my two chapters (both were supposed to be 30 pages or more) until about 6 days before they were due. BIG MISTAKE! I wrote solid every evening until the sun rose up and then some. Most experience writers probably wouldn't have needed to take that long, but I was still new, so I did. Again, use your time wisely. That goes for just about everything I guess. I'm just a horrible procrastinator, but I will say it's because I was an independent consultant at the time. Now that I have a full time job, time management is a lot easier.
After that I wrote two more articles (Creating Strongly Typed Collections and ASP.NET Templating and Skinning for Advisor magazine), which were suprisingly easy. I think I wrote each of them (about 2000 words) in about the same time (4 hours each). This seemed really strange to me since all my other writing had taken soooo long. That is the great thing about writing though: Variety. I get to write about all the things I love in .NET and share it with others. Sometimes the articles are hard, sometimes they're easy.
I'm writing my 4th article write now on What's New in Whidbey, for all your Advisor readers out there ;) One of the things I find most challenging and the most fun is trying to come up with something that hasn't been written before, at least not in the same way. I can't say I've done very well at that yet, but it's something I'm constantly working on. There have been a million things about “What's New in Whidbey” already, so this should be a good challenge! :)
I'd imagine that there are a lot of people like me out there (i.e. Coders that would like to look at doing some writing) and all I can say is...it's tough sometimes. I find that quite often I know exactly how something works, but I don't know exactly what it works that way. IMHO, it's hard to BS the readers. With the resources out there today, people can look things up in an instant, so you have to be extremely accurate and know your stuff. For Coders turned Writers, this usually isn't the hard part. The hard part is the writing itself. Explaining to another person what you already know. Seems easy, but often times...it isn't!
I hope this ramble has given a little insight to what it's like to do technical writing and wasn't too much of just a flat out ramble ;) Let me know if you have any questions...
Today I received on my doorstep my two free copies of Duncan's new book Visual Basic .NET 2003 Kick Start from Sams Publishing.
For this book, I acted as the main Technical Editor. Later on I was offered an opportunity to do some actual writing. I ended up writing chapters 5 and 6 (ADO.NET and DataBinding) and was the technical editor for all the other chapters of the book. It was a great experience for me as I am halfway new to writing. For anyone that comes across my blog and have used VB6 and are wanting to move to VB.NET or just pick up some new tricks and base knowledge of VB.NET 2003, I'd highly recommend this book.
Thanks Duncan! :)
Do my eyes deceive me? Did I just use C# Whidbey and after completing out a Property, then decide it was the wrong one and hit backspace and see Intellisense come up just like I'm used to in VB? I must be dreaming!
Anyone else see any “nice” C# IDE features that we VB'ers might be used to? Or do not too many people jump back and forth? :P
Need a quick site up with a template and allows for skinning? I went ahead and uploaded one. If you're new to ASP.NET this should be a good start to get the base of a site going that you can build on.
Hopefully someone will get some use out of it...enjoy! :)
Skinnable Template Site
If Not You.WasAtPDC OrElse Not You.WasAtObjectSpacesSession Then
You.GoToSession(“http://microsoft.sitestream.com/PDC2003/DAT/DAT410_files/Default.htm“)
End If
I always thought I would like ObjectSpaces, but after watching that session I am sold! We've been discussing at work for the future of our big product and how we'll do the object model/data and we've come to the conclusion that Typed DataSets are the way to go. After watching the ObjectSpaces presentation, I wish it was out now, because it currently does or will before release cover all of the downfalls of the other options (Business Objects, regular DataSets) which is what made us select Typed DataSets. ObjectSpaces will definitely be one of my focuses until release! :D
Been playin' around with Whidbey (ASP.NET, Generics, SQL Project, etc) and Yukon a bit this weekend and remembered I thought the DynamicImage Control was going to be cool, but couldn't remember much about it, so I went in and played with it and wow this thing is cool! :)
It has 4 main properties:
- ImageGeneratorUrl
- ImageFile
- ImageByes
- Image
ImageGeneratorUrl taks a Url to an ASPX that you want to use to generate the image from. ImageFile is a string that is the location of an image file to use. ImageBytes is a byte array, so if you're loading an image from some other store like a database all you have to do is pass it the byte array and it will show the image wherever you have the control (thank god for this one...only way around it was to do it all in an ASPX and use an img tag before now). Image is just a System.Drawing.Image, which means if you're creating a dynamic chart, you could just build the image, set the Image property on the control and you're done! Fan-freakin'-tastic!
One scenario that I know would be at least useful for me is to be able to set a base image, draw on top of it and have it be rendered in the control...this didn't really seem to work the way I had intended. I was hoping by setting the ImageFile to a base image (say one that fits into the scheme of my site, since it's not always possible or worth the time to draw fancy gradients and what not behind your images), then read the Image property and see that the Image was already in there. It's not, which is ok, I just used the ImageFile property to go load it myself, redraw on a transparent logo on top of the image, then set the Image property to my modified image. This would be perfect for an account based site where the logo should be different depending on who's looking at it. Before setting the Image property though I had to set the ImageFile property to String.Empty since you can only have 1 of the 4 I mentioned earlier set at a time. The resulting code looked like this (quick and dirty)...
Private Sub DynamicImage1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim MyImage As System.Drawing.Image = System.Drawing.Image.FromFile(Server.MapPath(DynamicImage1.ImageFile))
Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(MyImage)
g.DrawImage(AppropriateImage, 0, 0)
DynamicImage1.ImageFile = ""
DynamicImage1.Image = MyImage
End Sub
Now at design time I can change my base background file and also have the logo fit right into the look of my site. There are ways to make this more efficient and cleaner, but for just playing around I'd say it works out pretty nicely. Once I get more into master pages and skinning I'm sure I'll be able to fit it right in with my existing code, especially since there's not much of it. If you haven't checked out this control, do so...I like it alot! ;)
Last week I gave the presentation at our user group meeting. The code and Powerpoint slides are now up for you to check out if you're interested. I basically went through how to setup a base template, use it, then create multiple skins the user can select on top of it.
Download here
Hope someone gets some use out of it...I know we have! :)
I worked yesterday on taking a layout for a client site made by my co-worker and moving it into a custom template (Inherit from BasePage, add menu and properties, etc) and ran into a problem with HTML being pretty horrible. As Adam put it, “who thought it would be a good idea to render whitespace?”. Good question...but we're unfortunately screwed for now. The problem we had in our case was having a carriage return (and maybe tabs and spaces) after the beginning of a div tag with and image and then a table in it. That extra white space left a small (maybe 4 pixel) gap above the table. Not good for this particular site layout. No problem, just remove the whitespace and butt the tags right up against each other. Now, move it into the template and it gets much harder to keep that whitespace from coming back, especially since the ASP.NET designer puts it back everytime you go into design view of one of the ASPX's. It's ok for us...we don't really need the designer, but our client may want to use it. They're new to .NET and might not understand what's going on, so why not make it so the whitespace is “ignored“. This is quick and dirty so there's probably a better way...
Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
If TypeOf m_Template.Content.Controls(0) Is LiteralControl Then
Dim Temp As String = DirectCast(m_Template.Content.Controls(0), LiteralControl).Text
Dim Current As Char = CType(Temp.Substring(0, 1), Char)
While Current = Chr(9) OrElse Current = Chr(10) OrElse Current = Chr(13) OrElse Current = " "c
Temp = Temp.Remove(0, 1)
Current = CType(Temp.Substring(0, 1), Char)
End While
DirectCast(m_Template.Content.Controls(0), LiteralControl).Text = Temp
End If
MyBase.OnPreRender(e)
End Sub
m_Template.Content is a PlaceHolder where all the controls of the form are place for the template. All this code does is grab the first literal and remove whitespace at the beginning. There's probably some RegEx that's better than this, but I'm no RegEx expert! :P After this code is inserted into my base Page class, it doesn't matter what whitespace is on each page, it will be removed so there's no spacing problem. Hope someone gets some use out of this! :)
More Posts
Next page »