Hamburgers and Fried Hard Drives

by Jon Davis 26. July 2009 15:28

Not supposed to blog about blogging but my laptop has been out of commission due to hardware failure (another fried hard drive, I have to stop leaving my laptop roasting in Phoenix heat when I’m not with it), and it’s become my primary PC, so whatever I was doing suddenly got put on hold. For a week.

I intended to get that CAPTCHA prototype solution working by Tuesday or Wednesday, but, again, due to this hardware failure I was unable to fix it. Time is money in any tech solution space so that’s a bummer. But fortunately I receive blog comment spam in my Inbox reminding me that I need to get this thing done, so it’ll get done.

I meanwhile have a number of other projects that also got put on hold. Now there’s a big hill to climb to catch up.

I’ll delete this post upon my next update. If you’re subscribed with RSS than that won’t mean anything to you. But I’m sure I have an audience of one (myself). ;) Nevermind. 

On another topic, wow, Carl’s Jr. never ceases to amaze me with their burgers. They’ve upped their game over the years. They aren’t just a good competitor to other fast food burgers, they are in a league of their own. I just had what I thought would be a simple Famous Star single-patty cheeseburger, add bacon, and the thing was as tall as it was wide, with lettuce, tomatoes, onions, and the like. I had to use multiple napkins. It tasted like something among the best that planet earth has to offer. And I really only went over there because I wanted their natural cut fries.

I tried their Guacamole Six Dollar Burger combo when I drove through Las Vegas, at midnight, after reaching the north end of the newer part of the Vegas strip. It was a great highlight of my Vegas drive-through, no kidding. I'm no connoseuier (sp?) of burgers, I think I eat maybe one or two hamburgers a month these days on average, but when I do, what a way to make it count!!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Let's Try That Again ...

by Jon Davis 15. July 2009 01:00

This blog was going to be my first use of the prototyped CAPTCHA engine I blogged about yesterday, and wouldn't you know it, I overlooked some XSS (cross-site scripting) constraints that needed to be unmangled. Dang it, I wish localhost testing didn't leave us so thoroughly in the dark..

CAPTCHAThisYo.com is actually not working at all. Its demo worked within itself because the engine and the site are on the same domain.

No worries, I'm working around it, it's just gonna take me a bit more work to get past it. It'll till be [almost] as easy to implement CAPTCHA as yesterday's design. More to come ...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CAPTCHA This, Yo! - Early Alpha

by Jon Davis 14. July 2009 01:54

I've posted a mini-subproject:

http://www.CAPTCHAThisYo.com/

The site is self-explanatory. The idea is simple. I want CAPTCHA. I don't want to support CAPTCHA in my apps. I just want to drop in a one-liner snippet somewhere and call it done. I think other people share the same desire. So I now support CAPTCHA as a CAPTCHA app. I did all the work for myself so that I don't have to do that work. I went through all that trouble so that I don't have to go through the trouble .... Wait, ...

Seriously, it's not typical CAPTCHA, and it's Not Quite Done Yet (TM). It's something that'll evolve. Right now there isn't even any hard-to-read graphic CAPTCHA.

But what I'd like to do is have an ever-growing CAPTCHA questions library and, by default, have it just rotate through them randomly. The questions might range from shape detection to riddles to basic math. I'd really like to have some kind of community uploads thingmajig with ratings, so that people can basically share their own CAPTCHA solutions and they all run inside the same captchathisyo.com CAPTCHA engine. I'm just not sure yet how to pull that off.

Theoretically, I could take the approach Microsoft took when C# was initially released (long, long ago, in a galaxy far, far away), they had a cool insect sandbox game where you could write a .NET class that implements some interface and then send it up to the server and it would just run as an insect on the server. The objective of the game was to write the biggest killer/eater. I'm not sure how feasible the idea is of opening up all .NET uploads to the server, but it's something I'm pondering on.

Anyway, the concept has been prototyped and the prototype has been deployed is sound, but I still need to work out cross-site scripting limitations, bear with me. I still need to find a designer to make something beautful out of it. That said, feel free to use it and give feedback. Stand by.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

C# | Computers and Internet | Cool Tools | Pet Projects | Techniques | Web Development

Office and COM interop with .NET: *Now* I'll give you a second glance

by Jon Davis 10. July 2009 14:27

Well we're not quite a decade yet--certainly a lot longer than five years, though--since .NET came out and promised to be the next big thing for programming. C# was supposed to put VB6 to shame. It didn't, though, because with VB6 you had such things as optional parameters and variants--the latter being an ugly beast but under the covers the flexibility that VB6 was made programming so much quicker and easier sometimes.

Now that C# 4.0 introduces optional parameters and dynamic objects, the whole playing field is changing. And now I can feel a bit freer to tinker with old-school technologies built on COM in my language of choice because the language has finally caught up with last decade's featureset in this respect.

I like this somewhat recent blog post by SamNG:

http://blogs.msdn.com/samng/archive/2009/06/16/com-interop-in-c-4-0.aspx

Lets look at a quick Office example.

	static void Main()
	{
	Word.Application app = new Word.Application();
	object m = Type.Missing;
	app.Documents.Add(ref m, ref m, ref m, ref m);
	}
	

This is such typical code! I have to struggle with the type system to make it happy, just to add a simple Word document!

... [With C# 4.0] in the following code, call (1) gets transformed into call (2).

	static void Main()
	{
	Word.Application app = new Word.Application();
	// (1) Your initial call.
	app.Documents.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing);
	// (2) Compiler generates locals and inserts them.
	object m = Type.Missing;
	app.Documents.Add(ref m, ref m, ref m, ref m);
	}
	

The great thing about this too, is that with the introduction of named and optional arguments, and using the fact that the feature generates Type.Missing in place of default values for object on COM types, we can simply remove the arguments altogether!

	static void Main()
	{
	Word.Application app = new Word.Application();
	// (1) Your optional-parameter-omitted initial call.
	app.Documents.Add();
	// (2) Compiler generates locals and inserts them.
	object m = Type.Missing;
	app.Documents.Add(ref m, ref m, ref m, ref m);
	}
	

Pretty cool stuff huh? Definitely makes programming against the Office APIs much nicer.

Yup. Indeed.

Silverlight 3: 3D support has buggy occlusion?

by Jon Davis 10. July 2009 14:07

I just downloaded Silverlight 3 and Blend 3. First thing I did was try out one of the samples. I grabbed the Zune 3D sample, then ran F5 to run it. I was able to spin the Zune model by dragging the mouse from the base of the model. But then I immediately noticed that it doesn't look right. The arrows and artwork that are on the sides of the model do not get properly occluded while the whole thing is spun. The artwork occludes too soon, and the arrows don't occlude at all.

Could be a bug in the sample. But could be a glitch in Silverlight itself. I wonder?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Silverlight

Visual Studio Debugger Tips (cont'd)

by Jon Davis 8. July 2009 10:29

Here's another good article with debugger tips:

http://geekswithblogs.net/sdorman/archive/2009/02/14/visual-studio-2008-debugging-tricks-ndash-multi-threaded-debugging.aspx

Have you ever hit Break while debugging a multi-threaded console app and the only thing VS tells you it's still on is ReadLine(), where it's waiting for some input but meanwhile some other threads are working and you can't see them? The above-referenced article showed me how to access those other threads. It's all at:

Debug menu -> Windows -> Threads


 

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Jon Davis (aka "stimpy77") has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

Jon was previously employed as a senior .NET developer at a very well-known Internet services company whom you're more likely than not to have directly done business with. However, this blog and all of jondavis.net have no affiliation with, and are not representative of, his former employer in any way.

Contact Me 


Tag cloud

Calendar

<<  October 2018  >>
MoTuWeThFrSaSu
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar