Thursday, June 24, 2010

Tip On Web Service Engineering

On my last project, I'm sending data back to a client. The client is taking the data and updating several internal systems before acknowledging the data is received by sending me back a success code.

This is causing me all sorts of head aches. Their internal systems a slow, and I'm getting some strange errors. I upped the timeout to 10 minutes even, and still no love.

So, some advice. Just pass data to a store. Have your clients and yourself do their processing on that data outside of the web service. This will speed things up quiet a bit and help narrow down issues, and avoid timeouts ;)

If need by, you can setup your status's something like this.

  • Data Sent but Save Failed.
  • Data Sent Successfully.
  • Data Processing Failure.
  • Data Process Success.

Thursday, June 10, 2010

Linden Labs on the Decline

Linden Labs, the makers of the virtual world Second Life, announced a 30% layoff.

http://www.casualgaming.biz/news/30231/Second-Life-firm-cuts-jobs

That is a shame. To me that kind of spells the end, though it will be a slow one, and Second Life will never completely disappear, as it is open sourced now and has a solid core group that love Second Life.

My experience with Second Life goes back when I walked into a co-workers cube and saw his Second Life avatar flying over a virtual landscape. Crappy graphics, things didn't rez in very well, he and I basically po-poed it. But as I left his cube I saw something, and I hate to say it, something that caught my attention. I'll get to that in a minute.

Then I heard about someone selling virtual land in Second Life for big bucks. Really? I thought. Our V.P. at the time seemed to thing this Second Life thing might be of use for educational purposes, and my co-worker who originally explored Second Life didn't seem much interested in pursing it, so I thought I would take a peak.

Well, long story short. Enthralled by Second Life's potential, was like viewing the future. Built a virtual university with others for demoing. Went no where. Second Life was too bugy, lacked a few key features. Met my future wife during the process though. Ended up getting a new job and leaving Second Life behind me.

I've got a lot to right here, but now isn't appropriate, so I'll come back. The short is, Linden showed us what could have been, but couldn't deliver, partially because the technology (bandwidth mainly), partially by design flaws built deep into the platform that were too costly to fix, and partly due to not really understanding what they had, a real "Second Life" isn't here yet.

Props to Linden Labs (Corey and Phil, plus a few other unknown to me engineers) for taking a great stab at it. I wouldn't consider the upcoming failure of Second Life a persona failure. You guys laid the ground work that probably won't be picked up on as soon as people think, but one day will. Thanks.

Sunday, May 30, 2010

Wednesday, April 21, 2010

Awesome Canvas 3D Demo

You look at this and think, cool. But really think about it. This proof of concept opens up a lot of possibilities.

Tuesday, April 20, 2010

Cool Website Builder

This link popped up on the radar. If you want to build a free website, this site is the best I've seen so far. Check it out (and no, this is not an add, never heard of these guys before until today, just impressed by the quick look I did).

http://www.ucoz.com/

Monday, April 12, 2010

jStorage - simple JavaScript plugin to store data locally

Local storage seems to be coming of age. Some very intelligent folks have come up with a nice 2kb wrapper for using browser based key/value storage. IE6 is even supported as well.

jStorage - simple JavaScript plugin to store data locally


Thursday, April 08, 2010

jQuery Awesomeness

Check out this implementation of blackjack using jQuery! Very cool.

jQuery 21


Monday, April 05, 2010

Simple C# Wait Statement

I'm in a scenario where I'm making a get call to a web service, and if the get call fails for some reason I have to immediately call the web service back and let the client's know there is something up with their data. Well, apparently closing your web connection and then immediately calling it sometimes creates issues, as even though the service is closed, there is a little latency. So I was doing a thread.sleep before calling back, and that caused some issues. So here is a little wait statement equivalent I found

DateTime waitTime = DateTime.Now + TimeSpan.FromSeconds(2);
while (waitTime < DateTime.Now) {;}

Simple. Found it here - http://forums.xna.com/forums/p/908/6180.aspx

Monday, March 22, 2010

What Browser?

I'm using Google Chrome more and more, and I dig it. Of course all my personal data is being captured and resent back to Google, a given. Right now I don't care too much about that, but that might change. As far as a clean, responsive browser, I'm liking Chrome, and I didn't think I would.

I think for an every day browser I would still recommend Firefox (more plugins). I think IE will be back in the game once IE 9 comes out, but till then I'm generally staying away from IE now.

If you are like me and initially evaluated Chrome, said "not seeing what the big deal is", and moved on, you might want to give it another try.

Sunday, March 14, 2010

List of Open Source Useful Software

Yeah, it is time to redo my laptop. So as I go through the process, I thought I would list some of the common freeware apps that I use. If you know of any good ones feel free to list them as well. I use a Windoze so this won't help you Mac folks much.

  • Irfanview - great for simple image viewing and manipulations
  • Virtual Clone Drive - Opens ISO's locally
  • Izarc - Unzip utility with RAR support. Careful, site has a big advertisement that confuses the Isarc download with something else that isn't free
  • CD Burner XP Burn CD's and DVD's
  • Winamp- The old stand by for playing MP3's
  • Sumatra PDF - Faster, Lighter Adobe PDF reader
  • Open Office - Alternative to MS Office (There are others as well, google them yourself)
  • Virtual Box - Run virtual machines on your computer
  • Gladinet Cloud Desktop - Use this so I can map a drive to Microsoft's Live free 25 Gig free remote storage (see previous blogs)
  • Paint.Net - Great for light Photo manipulation, not Photoshop. Also there are some great web based alternatives, do a google search.
  • Notepad ++ - Great open source notepad replacement similar to Ultra Edit (Use Column Editing)
There are also some services I use, some I even pay for. I'll do a post for those as well, as well as update this list. I know there are more great open source software tools out there, I just either have commercial equivalents or I haven't used them yet.

Tuesday, February 23, 2010

Sunday, February 14, 2010

Great Online Backup Option

I was looking at drop box when I found a Microsoft offering that allows you to backup 25 Gigs free. It is called skydrive (google microsoft live skydrive).

Then I found instructions on how to take Skydrive one step further

http://www.groovypost.com/howto/microsoft/mount-windows-live-skydrive-drive-letter-windows-explorer/

Haven't tried it yet but I'll update this post when I do. If you give it a try let me know what you think.

Update: Works like a charm. Gladnet looks like something worth checking out for cloud backups of servers and such as well. If you want an alternative to Gladnet to access your Skydrive, check out this-

http://www.cloudstorageexplorer.com/

Wednesday, February 10, 2010

Top Languages in Programming

Tiobe came out with a new tracking list of the top programming languanges. Interestingly, if this is correct, Ruby is a lot higher ranked than I thought. Java is still #1 (what?...yep, it is, suprisingly, do a search on dice.com for Java jobs and you will be suprised...Java is not dead). C# is strong and interestingly PHP continues to climb. I guess a dynamic language made for the masses rather than crafters has its merrits. I like PHP, have to play with it more.

TIOBE Software: Tiobe Index

Sunday, February 07, 2010

Lot's to Learn

Well, I've got lots to learn. I've coasted the last few years on past knowledge. This doesn't mean I've learned nothing in the past few years, I've learned a lot. But the learning has been incidental and random, not directed and focused.

Unfortunately, one of the reasons I've been dragging my feet is because 1) real life has been chaotic for the last few years, and 2) I'm burning out a little bit. It seems the new ways of doing things focus on best practices and how to do things properly, while bringing very little to the table as far as adding new capabilities and functionality that end users see in the software they use. Much of what I do professionally now doesn't fit into the best practices model, where if I have a spec it literally will be written on the back of a napkin, if I'm lucky. Usually by the time a project at my current company surfaces to me I've got very little time, very vague instructions, and really not even a clue to what I am doing. So I cowboy up, take my best guess, get it wrong, and then reiterate the process until I've got something that works.

Then I go into a hurry up and wait phase until the next project comes along. To be honest my last iteration of doing this fried me quiet a bit and I didn't do the greatest job that I could have. I just simply got tired of asking questions, getting contradictory answers, and to be honest finding out some of the techniques I used weren't the best approaches to solving the problems at hand. What could have taken three days is dragging on for weeks, and it is partially my fault, something that is not good.

So, going forward, I've got to be a total pain in the ass until I get what I need to succeed. If this pisses people off too bad. If they want a quality result, I need some direction to start with. If I disappoint as a mind reader, well too bad. But in the mean while, I've got to retool. If I.T. becomes drudgery I won't last. So what to do?

As I've said, much of the new techniques out there aren't about doing new things, but doing old things a different way. I've decided this isn't the best point for me to tackle while I've burnt out a bit. I will put some effort here, but it will be tritary until I get feeling a little better about working in technology. Just doing the same old crap but wrapping it in extra layers of complexity with the blogosphere telling me the new ways are best when I know that isn't always complex will just depress me.

So what next then? Well, there are new programming techniques that are coming out that focus on new capabilities that actually result in new functionality on the user side, so this will be my secondary focus. Most of this will be dealing with .Net, Javascript, and Silverlight. I'd love to give some attention to Flex/AS3, but I can't cover every base at this point, so for the next six months that is out.

So what is left? That is an easy one for me. User interface design. I remember trading some wine for my original copy of Photoshop 4 with a guy at Adobe. I love photoshop, but because I work for big corporations almost all my emphasis is on the back end, making things look pretty hasn't been a huge priority. In fact since the last year and a half since I've mainly been working on existing applications I haven't design any user interfaces (with the exception of one in Silverlight, but that closely matched the look of our existing stuff). So my copy of CS3 gets dusty on the shelf.

F that. I'm looking at what people are doing with Photoshop both for art and web design and it is awesome. I've started going through some tutorials and you know what? It isn't all that hard. You don't even have to be a great artist to so 95% of what gets done, you just need to know some basic techniques and know how and when to use them.

Photoshop interest me. So using Photoshop for software interface design is where I'm going to throw most of my effort this year. Hopefully things will become fun again. Plus, if in the future I ever want to strike out on my own, small business like things to look really nice. It is more important that smaller more public applications look nice than it is for corporate apps seen only by a few engineers.

So my learning patter for this year will be as prioritized,

1) UI Design (Photoshop, maybe some entry level 3D apps as well)
2) Web 2.1 (Javascript/jQuery, CSS 3)
3) New ASP.Net capabilities (4.0 stuff), Silverlight
4) Other technologies (PHP, Python, Apache, Memcached, mySQL)
5) Keeping up to date with SQL Server (pretty solid here in my own mind, just spend minimal effort to stay current dealing with CLR type stuff).

And if time permits
The buzz word stuff (Agile, Unit testing, Scrum, etc...)

Tuesday, February 02, 2010

Project Wonderland Supported By Sun Oracle No Longer

A gold mine awaits a group of talented developers who can pull off making the metaverse(a virtual world that parallels our own where people work, meet, and socialize). Second Life was darn close, certainly it came out at the right time. But technical debt related to initial infrastructure choices limits Second Life to being not to much more than an adult oriented virtual hookup spot at this point. Too bad.

Some folks at Sun Microsystems recognized Second Life's potential, and the fact that Second Life wasn't going to pull off the metaverse, so they started project Wonderland. Project Wonderland from the outside was geared towards businesses. I'd say it has a long way to go to becoming a mature product, and with this announcement it probably never will.

http://www.virtualworldsnews.com/2010/02/oracle-abandons-project-wonderland.html

Swing and a miss. This whole metaverse thing is a hard fastball to hit. I understand that. Maybe no one can nail it. But if someone swung with the right bat at the right time...they would make an easy home run.

On further reflection, the opportunity lies wide open to the mega game studios out there. They just have to think outside the box. Two things hold them back. One, wanting to focus on "games" and stay away from business (knock knock, some of the worst corporate types on earth rule over you game thrulls), and their unwillingness to lower themselves to deal with game playing humanity on a more complex level (social interactivity, meeting members of the opposite sex online for love and romance, doing things other than questing, leveling, and crafting). Yet I know many great gaming creators have it in them to create the metaverse. They just need to have their presuppositions move aside, let the ideas flow, and make it.

Sunday, January 24, 2010

Indie Games

I know how hard it is write software. So I have a lot of respect for Indie Game Developers. So when I hear about them, I will list them for your pleasure. Most of these games I haven't played, so buyer beware. If I do play the games, I will review them.

Immortal Empire (RPG, Fantasy, Single Player)
http://www.tacticstudios.com/empire/
Gratuitous Space Battles (this one looks good, in my queue)
http://www.positech.co.uk/
Driving Speed Pro
http://www.wheelspinstudios.com/drivingspeedpro/index.html
Snake Munch
http://forums.indiegamer.com/showthread.php?t=20044
Dating/Scheduler Game
http://www.winterwolves.com/theflowershop.htm
Galaxia Adventure game
http://www.galaxiachronicles.com/
Dead Wake (Zombie FPS)
http://www.deadwakegame.com/

Thursday, January 21, 2010

Another WCF Gotcha

Oh my friend WCF. My latest love affair with WCF occured when connecting to an unsecured asmx web service for testing using WCF. I added a service reference to my web project, the proxy classes created fine, so I connected and...hang!

I ended up using the srvutil to output a config file that had different settings then the auto generated config entries for binding that WCF created when adding the service reference to my project. Using the new config file actually worked, but be careful, because I think WCF will cache server reponses for a minute or two. I know this doesn't make any sense, but it seems like if you change the config settings, fire up your project again, and try to connect, you will error out unless you wait a minute or two. Just a tip.

Anyway, here is a link for dealing with WCF using Srvutil.

http://nayyeri.net/integrating-wcf-clients-with-asmx-services

and a link for WCF bindings

http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.aspx

Sunday, January 17, 2010

ReadyBoost in XP?

Essentially ReadyBoost in Vista and Windows 7 is using a Flash drive or other external device as a place to put your system pagefile. This can be accomplished with good ol XP and actually older win OS's just by tweeking where your pagefile.sys will be stored manually. Here is a tutorial that not perfect will give you the info you need to accomplish this.



Enjoy

Wednesday, January 13, 2010

Ajaxian » Gordon: Flash Runtime Implemented in Javascript

Now this is cool!

Ajaxian » Gordon: Flash Runtime Implemented in Javascript

USB "Broadcast Power" Charger

I used to love playing a pen and paper roll playing game called Gamma World. Gamma World was a post apocalyptic world where you made a character that roamed the radioactive ruins as you tried to survive. In the game there were remnants of super technology from the post-nuke world, including robotic units and human looking androids, most of which ran off of "broadcast power".

Well it looks like Gamma World's vision of broadcast power is coming closer. Pretty cool.

Airnergy Wi-Fi Powered Charger

Wednesday, January 06, 2010

Silverlight and styles

Silverlight and styles - Gabriel Schenker's Blog - Los Techies : Blogs about software and anything tech!

Near Death Studios Closes | Edge Online

Many know about World of Warcraft.
But before "WoW", there was Ultima Online.
Before "UO", there was Meridian 59.

Meridian 59 actually was "doomish" looking first person perspective MMO that was way ahead of its time. It's original creator 3DO was going through a rough time of being bought and sold so they couldn't support the game, so it never took off like it could of. Near Death Studios tried to breath life into the game again, but WoW put them on a slow course with death that culminated yesterday. Interestingly, the websites are still up for NDS.


Near Death Studios Closes | Edge Online

Thursday, December 31, 2009

Photoshop Tutorial: Glowing Lines

I always see these background nice flowing lines on websites. Here is a Photoshop tutorial that will get you started making your own curves and lines.

Luminescent Lines | Tutorials Palace

Javascript Transition Library

New javascript transition effects library. It might have promise.

transm.js (javascript programmable image transitions)

Tuesday, December 29, 2009

Operation Weezy F. Baby. | Funniest Video of the Day

Pretty funny.





type="application/x-shockwave-flash"
width="450"
height="382"
bgcolor="#F4F4F4"
src="http://www.funnieststuff.net/FunniestStuffPlayer.swf"
FlashVars="videoFile=http%3A%2F%2Fvideos.funnieststuff.net%2Fcontent%2F2009%2F12%2F11%2F1%2Fproblemsolved.flv&videoTitle=Operation%20Weezy%20F.%20Baby.&autoPlay=false&fullScreenScriptURL=http://www.funnieststuff.net/scripts/funniestStuffPlayerFullScreen.js">

Saturday, December 26, 2009

Metaplace Goes Under

My brief foray into educational game design a few years back keeps me focused as least passively on what is going on in the game development sphere.

It looks like metaplace.com, which conceptually SHOULD have been successful, is shifting gears (going under). It is a shame, I think the 2.5D Flash environment has potential, but in a world of triple A shooters a cartoon big headed avatar Flash environment I think failed to capture content creators which spells death for metaplace's current model.

Oh well, sometimes you step up to the plate, swing, and strike out. I wish a prosperous future to the folks at metaplace, no harm in failing as long as they pick themselves up, brush off, learn, and move forward.

Thursday, December 17, 2009

Missing Enum.GetValues() when doing Silverlight for instance ? - Blog'A'Little

Missing Enum.GetValues in Silverlight? Here is a partial work around.


Missing Enum.GetValues() when doing Silverlight for instance ? - Blog'A'Little

If you name your class something like myclass.shared.cs and remember to put the partial keyword infront of the class you can declare this class in your web project and it will be shared with your silverlight project (if using the business or similar tempate, which breaks things up in a silverlight and a web project. Remember to include the folling namespaces at the top of the class.


using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;

Have fun.

Tuesday, December 15, 2009

Silverlight DataSet

Many an oldschool developer has been put off from joining the "RIA" world because data access through web services is a comparitive pain in the arse compared to old school ADO.Net. Some smart guys in Canada might be changing the equation (hopefully). I haven't used Laskarzhevsky Software's free Silverlight DataSet control yet, but it looks promising. Check it out and let me know what you think.

Laskarzhevsky Software Inc

TranslateThis Button: Copy+Paste translation for 52 languages

One push button translation. I like it.
TranslateThis Button: Copy+Paste translation for 52 languages

jSnow jQuery Plugin

Add some unobtrusive snow to your website for the hollidays.

jSnow

Wednesday, December 09, 2009

Great Into Silverlight RIA Services Video

If you are developing with Silverlight and RIA Services, and you haven't seen this video, I would watch it. Two hours that are well worth it.


Currently Watching : The Official Microsoft Silverlight Site

Friday, December 04, 2009

Thursday, December 03, 2009

WCF and Silverlight

We are experimenting around with WCF vs .Net RIA Services at work. Here is a pretty good entry level tutorial on getting started with WCF and Silverlight. One WCF method is exposed and consumed by a datagrid. Also so SQLtoLinq is used as well.

MSDN Switzerland Blog


Tuesday, December 01, 2009

Photoshop Tip: CS3 and CS4 Get Rid of the Hide/Show All Menu Items

I was working with Photoshop and the stupid menu items kept hiding themselves. If you are a guru, and you know what you need, that is fine, but I'm not. I'd like to always see everything and see it in the same spot in the menu list. Someone named Chris Koerner came up with a fix that makes this go away.

Remove “Show all Menu Items” From Photoshop CS4 « Chris Koerner

Thanks Chris!

Monday, November 23, 2009

JavaScript - Find position

This is kind of a useful script for setting the window's scroll position to that of an object's in javascript.

function Scroll2Pos(cID) 
{
var obj = document.getElementById(cID);
var curtop = 0;
if (obj.offsetParent)
{
do
{
curtop += obj.offsetTop;
}
while (obj = obj.offsetParent);
window.scrollTo(0, curtop);
}
}

It is based on this.

JavaScript - Find position


Friday, November 20, 2009

Thursday, November 05, 2009

Unit Testing: When You Should and When You Shouldn't

Unit Testing and Test Driven Development are all the rage right now, and rightly so, especially for the type of work some of the developers I work with do (low level switch programming on telecommunication critical infrastructure). But there are often cases where TDD and Unit Test is, well, overkill.

This article provides a much needed balancing perspective-


http://blog.codeville.net/2009/11/04/selective-unit-testing-costs-and-benefits/

Hat Tip: Elijah Manor


Wednesday, October 28, 2009

Basic: RSS Feeds

If you are a developer you can skip this one. A lot of non-developers ask me about RSS feeds. They don't quiet get them. The following is a great into to what RSS feeds are, how to use them, and a brief PHP tutorial on how to create them.

http://net.tutsplus.com/tutorials/other/feeds-101/


Military Technology: 30 Day Drone

This is pretty cool. A drone that can stay airborne for 30 days.

http://www.wired.com/dangerroom/2009/10/30-days-no-landing-darpa-aims-for-drone-endurance-record/


Wednesday, October 07, 2009

UFO? Drone? Freak Natural Occurance

Ok, it has been AGES since I posted any strange UFO/Fortean type stuff here. In fact what little is here I'm migrating to another blog. But I can't resist this one. This is good stuff.

Link

Watch the embedded video. It will make you go...huh...

Saturday, September 19, 2009

Excellent Form Validation Plugin for jQuery: Vanadium

I stumbled across Vanadium while reading I believe Ajaxian's blog. Vanadium is an excellent client side form validator for the jQuery framework. Check it out.

http://vanadiumjs.com/

Here is some sample syntax. Say you wanted to verify that a user entered in at least four characters in a textbox.

<input class=":max_length;4" type="text">


Vanadium uses the class HTML attribute to set the validation rule. Many rules are supported.

Wednesday, August 26, 2009

Forget your iPod or MP3 Player? Fear Not, The Grooveshark is Here

I'm not sure about how they get away with this legally, but it sure is cool. Live mp3 streaming from Grooveshark.

http://www.grooveshark.com

I found some tunes on the shark that I couldn't find on Amazon. Pretty cool. Use and abuse before the site goes offline.

Monday, August 24, 2009

Windows 7: First Impressions

So far Windows 7 has been great. I installed Windows 7 ultimate on an older laptop that I would never attempt to install Vista on. The only immediate bummer was driver support. But that is when I found out something very cool about Windows 7. It supports drivers written for older versions of Windows! Way cool, especially if you are trying to resurrect older computers. Just right click the installer, set the compatibility mode, and install. I got the sound and video working with XP drivers. I am impressed.

I pretty much could care less about graphical UI (kinda Office 2007 ribbon-ish), but under the hood Windows 7 appears to run very fast even on older machines.

I'm digging my old computer with Windows 7. I've got a bunch of older 3D software programs that I'd like to try out on this laptop to see how they run. I will post results as they arise.

So far, if you can get Windows 7, I'd say install it.

FYI, the specs of my older laptop if interested.

* 3.2 Gig p4 w Hyper Threading
* 64 Meg ATI 9600 Video Card
* 1 Gig of Memory
* 80 Gig HD

So far the laptop seems very responsive with Windows 7. Good job Microsoft.

Thursday, August 20, 2009

Open Source Non MS Tech

In looking at this word press theme-

http://www.inanis.net/blog/

I am blown away. With my experience with Word Press, you pretty much can add a theme and get it working in a few minutes. Not so with many MS tech open source projects out there. You will encounter some sort of obscure configuration detail that needs to be worked out, and waste time messing with arcana obscura to get things up and running.

Look what folks have done with "crappy" PHP and MySQL.


Makes me wonder.

Wednesday, August 05, 2009

Winamp Music Tip: Stream Those MP3's

When I code, I almost always have music or some sort of talk radio show streaming in the background. One thing that is bugging me is that I've noticed a lot of folks who offer podcast are starting to offer it in two formats, one a Flash web interface that streams, and the other a direct MP3 download.

That doesn't work for me. I've got so many web browser windows open I often times accidental close the one streaming music, and even if I am careful and don't I have to think about why the window is open and remember not to close it, which I don't like.

Downloading the whole MP3 sometimes isn't practical (i.e. a four hour show MP3).

So I remembered a solution to this problem from my audio editing days.

1) Copy the link to the actual download version of the MP3 file.
2) Open a text editor like notepad, paste the link, and save the file with an m3u extension, like "someradioshow.m3u".
3) Now click on the m3u file. If you have Winamp installed, it will begin to stream the mp3 file instead of download it. Cool huh?

Now we have our music app streaming, and web browser windows can open and close without hassle.

Tuesday, August 04, 2009

I Might Have To Get One Of These

Apple is coming out with a really cool little device the will be marketed as a console game platform, home computer, and home server rolled into one.

http://www.edge-online.com/news/apple-tablet-computer-to-double-as-a-game-console-analyst

I might have to get me one of these, and apparently, Bill Gates agrees (he was just a little early in agreement, perhaps).

http://gizmodo.com/5324866/vintage-bill-gates-predicts-tablets-to-be-the-most-popular-form-of-pc-sold-in-america

I might have to shift more time over to Unity 3D and Object-C development . I think Microsoft has made a few epic screw ups (Vista anyone?). One is they are listening to nerds as to what new features to offer rather then rank and file programmers. Coding on the MS stack is becoming too top heavy, maybe Unity 3D dev and Object-C will be a welcome breath of development fresh air, and a little competition will force MS to listen to everyone who uses their products rather than just enterprise developing geeks. No I'm not bitter!

Serious though, always remember there are no good guys. Apple sells crap hardware, so make sure you get those extended warranties. MS treats their development community well, but you pay a premium for their products that as time goes by, and open source stuff becomes better and better, I'm not sure is warranted. Linux is the only psuedo good guy out there, but since you can use many open source Linux apps on Mac's, might as well cough up a little extra cash for the Apple wow factor and mailine product (like Photoshop and 3D Packages) support.

Wake up MS, time to truely innovate, and innovate where the consumer can see the change, not the nerd army of developers behind the scenes. Bill understands, but he is taking more of a back seat now. Wow us Balmber, before MS becomes the next depreciated giant that rages on without knowing it is dead...

Monday, August 03, 2009

Tip: When/How Your Microsoft User Password

Not a major issue, but many of my work resources are some how tied to my domain authentication. So my password expired, so I changed it, but I didn't log off. Over the next several hours I noticed that I was loosing access to resources as my updated password propagaded through the network, but my local credentials hadn't been updated because I hadn't relogged yet. I had a lot of stuff open so I was trying to avoid a relog. I started off closing and reopening programs, but after a while it became such a hassle that I finally shut everything down and logged off/logged on back onto the domain. Problems solved, but I had to restart all my apps again.

So just a tip. Change your domain password at the end of the day, or change it and log off and log back on. If you are like me and have a ton of stuff open, the former is better then the later.

Wednesday, July 29, 2009

The Power of Twitter

We are becoming a society of self absorbed individuals. It is all about me is the mantra. Some of us pretend to resist this, ignoring things like bloggs, twitter, iPhones, etc.... Others like myself try to embrace the change, and end up getting sucked into the "its all about me" world just like everyone else, even though my intentions I pretend are honorable. "Look at my new blog post!" "Look at my facebook quiz, did you take it?!?" "I've got 100 followers now on Twitter!".

Well, for those of you who like to ignore this trend and the tools of self promotion, here is a cautionary tale of what can happen if you at least don't understand the new medium. The me generation has the tools to punish you if act like an @ss.

http://advanced-twitter-marketing.com/advanced-twitter-marketing/offline-businesses-beware-twitter-is-watching

Also as a side note, this article reveals how Google's search absolutely blows the competition away. I know M$ is trying hard to catch Google with Bing and Yahoo search, good luck :) The following quote is telling-

"All this - and Pete just posted the information THIS MORNING… Already a search for the headline, “Woman Sued for $50,000 Over a Tweet”, shows how viral this type of issue is: searching at Google shows 5,000 references to the article, searching at Yahoo! shows 6 results, and searching at Bing shows 34 results."

Source: (twitter) mparent77772

Wednesday, July 22, 2009

Old Man Grumblings

I guess I'm getting old, as far as programming goes. I see a lot of fads blowing through programming (apparently many geeks are actually more prone to fads then aren't, and this is interesting as you would thinks geeks with their alleged superior intellects would be immune), some of the fads are good, some of them OK, some of them not, but apparently ALL demand to be followed with absolute faith else your code is yukky and you suck (even though many programmers who didn't use all this stuff put men on the moon, designed planes like the SR-71, managed complex nuclear physics codes, yadda yadda yadda, just fine without all these extra layers of abstraction.

I digress.

I guess my point is summed up here.

http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25748

I might have blogged about this before, but I keep coming back to this, as it never gets old to me.

Monday, July 20, 2009

Not Digging Telerik

[Update] Someone from Telerik contacted me willing to help us out with our issue. That says a lot for Telerik and restores a good chunk of my faith in their controls and their support.

I like Telerik. They have produced some very cool controls to use with ASP.Net. Unfortunately the 2009 Q1 release broke all our controls at work. We normally inherit off of the Telerik controls and add some additional functionality. Whatever changes happened under the hood makes the Q1 + releases useless to us.

My job is to figure out a solution. So far no luck. Telerik says they don't support inheritance issues. Wish we would have known that earlier, or at least known to expect that existing working code will not be guaranteed to work in the future as is.

Sucks. Use this as a warning against becoming too dependant on 3rd party controls, as you can and will get burned.

Monday, July 13, 2009

70-536 Exam Prep

Ok, I hate getting certs. Did I say I hate it? Oh well, for those of you on the MCTS track for web development tacking the 70-536 exam, the following web page will be extrememly helpful.

http://en.csharp-online.net/MSDN_Reference_Guide_for_Exam_70-536

Also, the Microsoft training books for the exam, though useful, are riddle with errors. Just an FYI.

Saturday, July 11, 2009

SQL Server Express And Abyss Web Server

Ok, I have an ancient (PIII 850 mhz machine with 1 gig of ram) that I'm using as a test server. I've got Windows XP Pro installed and I'm using the Abyss X1 Webserver instead of the throttled IIS 5 that comes with XP. I ran into one snag though, I couldn't get my ASP.Net app to talk to a SQL Server Express database when I pushed my ASP.Net project from my dev box to the test server. So I fooled around and got it working, probably in a very insecure way, but it will work fine for now. Here is what I did incase this will help anyone.

First, I moved the database from the app_data folder in the web project to somewhere else, probably not necessary but I thought it might help. I also attached to the database using sql server express studio and created a new login name that was different then the one I used on my dev box (did this both for global security users and then added the new user to the instance of the db...again may not be necessary).

From there I himmed and hawed until I came up with a connection string that works. Here it is roughly. Sql server express was installed in a named instance like this-

devbox\sqldev

So my connection string ended in my web.config file for my asp.net project ended up like this.

<add name="somename" connectionString="Data Source=.\sqldev;AttachDbFilename=D:\data\test.mdf;Initial Catalog=reports;User Id=someid;Password=somepassword;user instance=true;Integrated Security=SSPI" />

Hope that helps someone else at least get going.

Wednesday, July 08, 2009

Infocyde!!!

I love RSS (ATOM) feeds. I subscribe to numerous ones. I spend way to much time looking briefly through my feeds using Google Reader, staring feeds that I'd like to read later.

Well, I decided that all these stared links were pilling up, so I went about trying to unstar them, parsing the info and putting it into some useful state either in my brain or an Evernote notebook.

Well, it took pretty much a good chunk of the day, just to get through LAST MONTH's stared items. There is just no way I can process all the data, and as we have learned throughout history (using intelligence and wars as an example) data not processed is absolutely useless, and the time spent gathering it data that wasn't processed is essentially another definition of absolute waste.

So, I'm pondering going to a once a week RSS feed check, and really being selective about what gets stared, and hopefully processing data right then into info. I don't know if I can do this or not because I'm so addicted to real time info, but I really should, for a lot of reasons.

And I bet I'm not the only one out there who has a problem with this. So here are my rules.

1) Can I find this data relatively easily in the future? Yes->Ignore the data.
2) Am I at work? Yes->Star the data for later.
No->Process it (save/copy/bookmark) now.

That should cut down on the info glut. I'm trying to turn myself into a search engine, and that probably isn't helpful productivity wise.

Monday, July 06, 2009

We Lost An Interesting Person This Last Week

Amid all the celebrities dying the media over looked the death of a lesser known but important figure who died recently. On July 3rd, John A. Keel died. He wrote the Mothman Prophecies and many other books relating to the Fortean, my favorite being Operation Trojan Horse.

I was very much on the same page (or like to think so) with Keel's views about UFO's, Ghost, Faeries, etc... all really being the same phenomena, and that phenomena isn't extraterrestrial, but ultraterrestrial. Keel, though not a Christian, declared on several occasions that he wasn't really a "UFO-ologist", but a "demonologist" because he recognized the phenomena for what it really is. He, independent of a religion paradigm, came to the same conclusions I have and many others have about UFO's being something other and more complex then little green men from space or hicks out in the back woods who drank too much.

I admired Keel, as I admire anyone, who looks around the world and realizes (or really admits to themselves) that there is more then meets the eye as to what is going on in this fascinating realm we call existence. I admire his courage and the intellectual honesty to peer at the things that "don't make sense" if the world is exclusively a by product of random mutation.

Here is a pretty good article on Keel and his impact on the Fortean community.

http://www.cryptomundo.com/cryptozoo-news/keel-obit/

I hope that Keel's journey lead him ultimately to Jesus, and that now John A. Keel is in peace.

Thursday, July 02, 2009

VS 2008 and PHP

Want a free version of Visual Studio 2008 that not only runs PHP, but also allows you to build win form applications using PHP?

Well then check the following link out-

http://www.php-compiler.net/doku.php?id=core%3aphp-in-vs2008

Have fun!

Wednesday, June 24, 2009

Microsoft BizSpark

I officially started a small start up company today. Microsoft has a great program called BizSpark. I don't want to give to much away, as it is a wide open program right now. But if you are a start up, or want to be, you should check it out.

Special thanks to AZ Groups and Scott Cate for helping me get started. Scott Cate rocks. And thanks to Microsoft for their willingness to help incubate start ups.

www.mykb.com

www.azgroups.com

www.microsoft.com/bizspark/

I still have and love my day job, so I will proudly serve my employer as long as my job holds out. So I'll only be a part timer at the new gig, but with two or three other developers also working part time, I think we will roll something out quickly. If anyone has some spare computers laying around, I'd love to take 'em off your hands.

And I've been praying about some direction, this opportunity just fell in my lap, so be sure that God answers prayers in Jesus's name. (I know, that makes me strange I guess, but it is true).

Monday, June 15, 2009

My HelloWorld LINQ Example

I know it is sad, but up until today I hadn't ever written a single LINQ query. So, for future prosterity, here is my hello world example.

 string[] s = { "test", "hello world", "mamma", "zack", "aaa","xxx" };
// LINQ
var subset = from z in s where z != "hello world"
orderby z descending select z;
int i = 0;
foreach (var l in subset)
{
Response.Write(
"Item " + i.ToString() + " = " + l + "<br />");
i++;
}

Sunday, June 14, 2009

What is Hot Right Now In The Job Market

I went to http://www.dice.com/ today out of curiosity ran some keywords through nationwide to get a rough indicator of what technologies are really in demand right now. Here are some interesting results (last 30 days).

Java: 8052 jobs
.Net: 4927 jobs
PHP: 1454 jobs
ASP.Net: 2324 jobs
Flex: 796 jobs
Flash 1081 jobs
test driven development: 2295 jobs
MVC: 520 jobs
Silverlight: 262 jobs
Design Patterns: 1368 jobs
Agile: 2221 jobs
SQL Server: 7285 jobs
MySQL: 1479 jobs
c#: 4014 jobs
Visual Basic: 895 jobs
VB: 1964 jobs
Javascript: 3589 jobs
jQuery: 314 jobs
AJAX: 2011 jobs
Photoshop: 646 jobs
Ruby on Rails: 257 jobs
Python: 1023 jobs
Maya: 19 jobs
3D Max: 13 jobs
Unity 3D: 1 job



A few surprises, I expected to see a lot more Flex and Silverlight jobs. Apparently Java is far from dead, despite what many bloggers have espoused. SQL Server DBA's are in high demand as well. Python also looks pretty strong where Ruby on Rails still looks over hyped in the blogosphere compared to demand.

Wednesday, June 10, 2009

Great AJAX jQuery ASP.Net Article

Here is a link to a great article explaining various methods for getting data from the client to the server and back using AJAX, jQuery, and ASP.Net.

http://www.mikesdotnetting.com/Article.aspx?ArticleID=104

Enabling GZip on IIS7

Here is an link to a blog post about how to get gunzip working on IIS7

http://cfsilence.com/blog/client/index.cfm/2009/6/10/Enabling-GZip-Encoding-On-IIS7

Saturday, June 06, 2009

Cool Javascript Visualization Library

This is a pretty neat JavaScript visualization library.

http://thejit.org/demos/




Source: Web Resources Depot

Thursday, June 04, 2009

Another jQuery UI Plugin Set

Check this new jQuery UI plugin set out!

http://flowplayer.org/tools/demos/index.html

Source: http://www.danvega.org/blog/

Adding CSS Links On The Fly In C#

Here is an example of adding a link to a CSS dynamically on an ASP.Net page. I stole this from somewhere, but forgot where, so please forgive the lack of attribution.


  void AddSmallGridCSS ()
{
HtmlLink link = new HtmlLink ();
link.Href =
"~/App_Themes/" + Page.Theme + "/mystylesheet.css";
link.Attributes.Add (
"type", "text/css" );
link.Attributes.Add (
"rel", "stylesheet" );
Page.Header.Controls.Add ( link );

}


You don't have to use app themes, the file can be in any directory.


Tuesday, June 02, 2009

Monday, June 01, 2009

Coffee Plantation in downtown Tempe to close Saturday

Last Saturday, my favorite coffee shop in Arizona closed. It is an end of an era. I spent a lot of time at the Coffee Plantion on Mill working remotely, hanging out with friends, and occassionally checking out all the beautiful woman that walked by. There were lots of cool characters that were regulars there, me being one of them. I really enjoyed hanging out there, the 'Plantation was a big part of my life for about three years between 2004-2007. A corner stone of the old dynamic of Mill Ave is lost. Even though I moved far from Arizona, Coffee Plantion you will still be missed.

Coffee Plantation in downtown Tempe to close Saturday

Shared via AddThis

Friday, May 29, 2009

Monday, May 25, 2009

Friday, May 15, 2009

Sad Loss, 60 Year Old Major Killed In Iraq

A Veit Nam viet reinlisted in the Army after his wife died, and then was killed recently. He is the oldest soldier to be killed in the theater to date.

http://www.chron.com/disp/story.mpl/ap/top/national/6424905.html

Thursday, May 14, 2009

The Magic Footer

I've done this before, but like usual if I only do it once in a while I forget how. The task at hand? Have a footer on a web page that stays at the bottom of the page. I did a quick search, and here are two ways (though there are others) of doing this.

1) Frack older browsers, and do it the easy way,

2) Or two, do a minimal CSS hack so you can support IE6 and older versions of Safari.

So here is some reinvent the wheel code. For number one, you just need a bit of CSS.

.footer{ width:100%; height:50px; position:fixed; bottom:0px; z-index:1000;}

then on your page, <div id="footer" >

done.

For step two, try this approach.

CSS bottom footer by MJT, or google fixed footer.

Proud Ship Leaves the Fleet

The Kittyhawk, the last US conventionally powered carrier, after 42+ years of service, now is entering moth balls.

http://nosint.blogspot.com/2009/05/carrier-kitty-hawk-leaves-active-fleet.html

Tuesday, May 12, 2009

Vista Built-In Unzip Sucks

There, I said it. The built in Unzip capabilities of Vista suck.

Sad End of An Era

Reign Radio, one of the best online Christian radio stations, died some time in April, and sad to say even though RR was one of my favorite audio sources on the internet, I missed its passing by a few weeks. Even the forums were locked down so I couldn't express my thanks for so many months of great music.

I guess the site creator, Shane, had been struggling to keep the site going for a long time. I think it was causing him to go broke and he wasn't getting enough donations to keep the station going. RR's passing is a true loss, but on to bigger and better things to the site's creator Shane.

www.reignradio.com.

Sunday, May 10, 2009

Star Trek, Generation ?

I saw the new Star Trek movie this weekend. I thought it was a pretty good flick, glad I saw it. I'd say the story was trekkie enough so that only the absolute purist star trek fans will not like it, the rest will enjoy it. I consider myself a trekkie light, and I thought they did a great job with the movie. The guy who played the new spock did an outstanding job, the character who played Kirk did well also, and all the rest put in good performances.

8.7/out of 9 Stars. Go see it.

Friday, May 08, 2009

Getting the Public Key Token of An Assembly

This is a useful tip. If you stumbled here, you know why you need it.

Link

Monday, May 04, 2009

One Note: I Get It Now

Ok, a very talented developer where I work at is all about One Note (part of MS Office 2003+?). At first I didn't get One Note, now I do. One Note allows you to-
  • Copy paste from web sites code examples
  • Makes all your content searchable
  • Has an interface to automatically post things to external blogs
  • Is easily Organizable.

I'm occassionally hunting through favorites/bookmarks wondering where that could I saw was at, while my developer co-worker just types in a few keywords in One Note and all the info is at his finger tips. Plus he puts all the locations of servers, company procedures, personal info, etc... all in One Note, so he really does have one spot to look for things.

I haven't fully explored One Note, but so far I like it. And if Office 2007 is a little to big a purchase for your wallet, try Ever Note. I haven't used it, but I hear it is almost as good, and it is free or low cost.


Evernote.com


Executing a Console App from ASP.Net

Well, I was fooling around with a .Net API that does google tanslations. I thought it might be a good idea to not call the translating API for bulk translations directly from the website, so I created a little console app so I can do that and do a thread.Sleep pause and control the SQL Connection opening and closing a little more robustly. Anyway, here is some sample code on how to open a console from ASP.Net in C#

 // path to the console app
string sPath = Server.MapPath("~/apps/GoogleTranslationConsole.exe");
// pass your path, and your arguments array into a ProcessStartInfo
ProcessStartInfo proc = new ProcessStartInfo(sPath,Request.Form["lagr"]);
// Incase you want to read messages back from the code
proc.RedirectStandardOutput = true;
// hide any command windows from showing up
proc.UseShellExecute = false;
proc.CreateNoWindow =
true;
// create the process that will control the console app
Process p = new Process();
p.StartInfo = proc;
p.Start();

// use console.writeline for data to return back.
// Also, be sure to either p.Dispose() of your process here or do
// do a System.Environment.Exit in your console app when work is done
//p.StandardOutput.ReadToEnd() for results.


Here is the original link that I got this info from, which is in VB.Net.

Opening a Console App in VB.Net

Note: I haven't deployed this code to production yet, I've only got it working on my local box. In a production environment you probably want to make sure that your console apps aren't accessible by the web, that your console app is secure enough so that it only does what is should do when it should do it, and that only the right people can execute it (thought for my purposes probably the IIS account will probably have permission to execute). Just something to watch for once you are to that point.

Tuesday, April 28, 2009

Ajax jQuery Chat Demo

** Update **

Here is a simpler version with source code designed for Webmatrix/Razor/MVC3
[HERE]


I wanted to do a quick demo for a chat client similar to the one I see on gTalk and Facebook. Note in this demo I am polling, I use javascript to poll a server page for any new chat comments. This technique will work ok for small to mid sized trafficed web sites. For heavy trafficed sites, you probably need to do some sort of subscript/event model, maybe using a comet server (google). That technique is beyond me at this point, but here is a demo of the more basic polling technique that you can expand on.

The concept is pretty simple. You need three things.

1) The chat page (HTML and jQuery...or in my case an aspx and jQuery page).
2) A push page with which will accept your chat form post and save them to a database (for this example I'm using SQL Server 2008.
3) a pull page that will send new chat messages to the chat pages as they become available (actually not really sending, the chat script will continuously poll the page about every 2 seconds looking for new data to read).

Ok, our chat page will look like this- (remember to include a reference to your jQuery script somewhere, not shown).

<form id="form1" runat="server">
  <div>
    <div style="width: 200px; height: 400px; border: solid 1px blue; overflow: auto"
      id="Chat_window">
    </div>
    <br />
    ID:
<input type="text" style="width: 80px" id="ChatID" maxlength="10" /><br />
    <input type="text" id="ChatMsg" style="width: 200px" maxlength="200" />
    <a href="javascript:postit()">Post</a>
    <script type="text/javascript">
      function postit() {
clearInterval(ptime);
var zpost = { "ChatID": $("#ChatID").val(), "ChatMsg": $("#ChatMsg").val() };
$("#Chat_window").prepend("<span>" + zpost.ChatID + ": " + zpost.ChatMsg + "<br /></span>");
$.post("push.aspx"
       , zpost
, function(data) {
pullit();
ptime = setInterval(pullit, 1500);
});
}
function pullit() {
var url = "pull.aspx?t=" + eval(Math.floor(Math.random() * 90000));
$.post(url, function(data) {
if (data == "") return;
$("#Chat_window").prepend(data);
while ($("#Chat_window").children().size() > 29) {
$("#Chat_window").find("span:last-child").remove();
}
});
}
var ptime = setInterval(pullit, 1500);
</script>
  </div>
  </form>



Ok, I know setting the ptime inline is bad form, but heh, it is just a demo. Some highlights. You have a postit and pullit method. The postit sends the ChatID and ChatMsg to the server as a form request. I'm adding some random query string var to the end of the pull.aspx page call to help prevent caching, this worked for me but you might have to tweak things a little bit more in your environment. The pullit method polls the the pull page about every 1.5 seconds for changes.

Now for the push it page. I'm using Asp.net, but you can accomplish the same thing in PHP or whatever.

 public partial class push : System.Web.UI.Page
  {
protected void Page_Load(object sender, EventArgs e)
{
SaveChatPost();
}
void SaveChatPost()
{
using (SqlConnection oConn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myconnectionstringname"].ToString()))
{
using (SqlCommand oCmd = new SqlCommand())
{
oCmd.CommandType = CommandType.Text;
oCmd.CommandText = "declare @ts as datetime;set @ts = current_timestamp;Insert into HonoviMarketing.dbo.tChat (ChatTime, ChatId, ChatMsg) values (@ts,@p_ChatID, @p_ChatMsg);Select @ts as CurrentChatTime";
oCmd.Parameters.Add(new SqlParameter("@p_ChatID", Server.UrlDecode(Request.Form["ChatID"])));
oCmd.Parameters.Add(new SqlParameter("@p_ChatMsg", Server.UrlDecode(Request.Form["ChatMsg"])));
oConn.Open();
oCmd.Connection = oConn;
using (SqlDataReader dr = oCmd.ExecuteReader())
{
if (dr != null && dr.HasRows)
{
dr.Read();
Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString();
Session["ChatID"] = Request.Form["ChatID"];
}
}
oConn.Close();
}
}
}
}


No biggie here (and if the code runs off the page, just highlight and copy it, you'll get it all, stupid blogger :)). I save the post to the database, get a current_timestamp, and set that as well as the chosen ChatID into session variables that help with pulling the right data on the pull.aspx page, which is next. Note on both pages I put this logic in the code behind of the aspx page, and removed all the HTML from the front page except for the top asp.net directives line. And again, I'm just doing a simple example here, not worried to much about query security and the like, so don't get anal.

 public partial class server : System.Web.UI.Page
  {
protected void Page_Load(object sender, EventArgs e)
{
PullData();
}
string XMLSafe(string s)
{
return s.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;");
}
void PullData()
{
using (SqlConnection oConn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myconnectionstringname"].ToString()))
{
using (SqlCommand oCmd = new SqlCommand())
{
oCmd.CommandType = CommandType.Text;
oCmd.Connection = oConn;
oConn.Open();
if (Session["CurrentChatTime"] == null)
{
oCmd.CommandText = "Select Current_Timestamp as CurrentChatTime";
using (SqlDataReader dr = oCmd.ExecuteReader())
{
if (dr != null && dr.HasRows)
{
dr.Read();
Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString();
}
}
}
else
          {
string sDate = Session["CurrentChatTime"].ToString();
SqlParameter p = new SqlParameter();
p.Direction = ParameterDirection.Input;
p.Value = sDate;
p.SqlDbType = SqlDbType.DateTime;
p.ParameterName = "@p_CurrentTime";
oCmd.Parameters.Add(p);
oCmd.CommandText = "select chatTime, ChatID, ChatMsg from HonoviMarketing.dbo.tChat where ChatTime > @p_CurrentTime and ChatID <> '" + Session["ChatID"] + "' order by ChatTime; SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime";
using (SqlDataReader dr = oCmd.ExecuteReader())
{
if (dr.HasRows)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
while (dr.Read())
{
sb.Append("<span>" + XMLSafe(dr["ChatID"].ToString()) + ": " + XMLSafe(dr["ChatMsg"].ToString()) + "<br /></span>");
}
Response.Write(sb.ToString());
dr.NextResult();
if (dr.HasRows)
{
dr.Read();
Session["CurrentChatTime"] = dr["CurrentChatTime"].ToString();
}
}
}
}
oConn.Close();
}
}
}
}



Again of note is that I'm using session vars to help pull just the latest message that is needed. One gotcha that I encountered with SQL server to be aware of is that you need to format the current_timestamp else you loose the milliseconds, which was causing the chat page to sometime receive double messages. You need to format in your query like so - SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime for setting an accurate time for a session var.

Also remember to put a reference on both pages to the System.Data.SqlClient if you are copying my code. Here is a pic of the table layout I used.




Happy coding!

[Update]

I noticed I didn't do the SELECT CONVERT(varchar, current_timestamp, 21) as CurrentChatTime formating on the if session["CurrentTimeChat"] == null clause for the first time the pull page is hit, you can add that if you want, though things seem to work without it. Also the XMLSafe method isn't really necessary nor fully implimented, so you can ditch that method if you want or fully build it out if you are concerned about illegal HTML and XML chars. I'd fix this all in code but reposting in blogger is a pain when dealing with code, so I'll leave it as is, which works fine.

Tuesday, April 21, 2009

Google Makes Another Raid into Web 3.0

Ok, I track what is going on in the web world, though I need to spend much less time tracking and more time doing, I did find something very interesting.

We have a battle for next generation web apps that currently is between Silverlight and Flex/Flash, with Unity 3D and some other plugins on the fringes.

But now Google enters the fray…

Google's new Open GL Web API

Source: Ajaxian.com

Tuesday, April 14, 2009

Javascript Gotcha: substr <> substring

I love Javascript, but I don't client side code as much as I used too, so coming from recent use in C#, I tried to do a substring on a string and pulled my hair out for about 15 minutes wondering why the results I was getting back wasn't at all as expected. Well, then I remembered substr, which operates in javascript like c#'s substring. Grrrr...

For more-

substr vs substring

Sunday, April 12, 2009

Free C# E-Book

Download your free C# 2008 Illustrated e-book from A-Press!

Free E-Book

Source: DotNetShoutOut.com

Friday, April 03, 2009