The online racing simulator
I've been learning TDD, and while I love the 'DD', I keep wishing I could drop the 'T'.
Quote from DarkTimes :I've been learning TDD, and while I love the 'DD', I keep wishing I could drop the 'T'.

I'm doing the same thing right now with the SDK. Trying to make things work the way I want, I left the code that does not work, and just started editing the SDK until it does work . I've got some very dirty code right now, but it should make it a million times easier for the general public to write things with the SDK in small bursts.
I like TDD for some things, I've had genuine fist-in-the-air moments when a test passes, but I'm having issues with the fact that I am writing two or three times as much code as I was before, plus I sense a real increase in the complexity of some of my code.

I enjoy some things, writing the tests first creates some nicely decoupled code, and as I say I have had some really great moments when a a complex algorithm finally passes. I was writing some code the other day that converted base 10 numbers into base 36, and I found the tests very helpful while I grappled with my bad mathematics.

It will be very useful when working with dynamic languages, such as Python, when you don't have the safety-net of the compiler, but I'm not convinced that for the sorts of GUI apps I write, that I am really getting an equal return for the time-investment.

Anyway I'm still having fun and I plan to continue with it for the time being.
Quote from DarkTimes :I was writing some code the other day that converted base 10 numbers into base 36

I do hope you made a ConvertBase procedure where the bases and intager to convert can be given as a parameter for the same reason that "no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter."

(To everyone who has watched me grow up over the past few years as a programmer starts weeping with joy at this point.)
Nah, it just converts between base 10 and base 36, as that's all I needed it to do. I'm a firm believer in YAGNI.

I was just interested in how URL shortening services like bit.ly and tiny.cc work, so I wrote one myself. I created the short-URL by converting the database ID of the new URL into base 36, which I'm pretty sure is all those sites do anyway. They're very simple.
-
(DarkTimes) DELETED by DarkTimes
-
(MariusMM) DELETED by MariusMM
There is no built-in method, but there is a little trick for counting files and lines in a solution.

Go to Edit > Find & Replace > Find In Files, set Use to Regular Expressions and enter this as the text to find:

^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+

Then click Find All, and it will tell you the number of files and the number of lines of code in the Find Results window.
-
(MariusMM) DELETED by MariusMM
I see that Microsoft are releasing a free express version of their IIS web server, which will work on any version of Windows.
Quote :
  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)
  • It does not require an administrator account to run/debug applications from Visual Studio
  • It enables a full web-server feature set – including SSL, URL Rewrite, Media Support, and all other IIS 7.x modules
  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support
  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)
  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

http://weblogs.asp.net/scottgu ... roducing-iis-express.aspx
Good move, although I don't see myself using IIS over lighttpd or apache.
Yeah true, but with IIS being the second most popular server after Apache, it's nice to finally have a free version. Also the new ASP.NET MVC platform is very nice, so it's a solid combination.
Quote from DarkTimes :Yeah true, but with IIS being the second most popular server after Apache, it's nice to finally have a free version. Also the new ASP.NET MVC platform is very nice, so it's a solid combination.

I hate to say it, but damn. That's freaking awesome. I would never use it, but it's nice to see Microsoft ... I can't believe I'm saying this ... Is going to keep apache on it's toes for a little while at least.
-
(Flame CZE) DELETED by Flame CZE
In other news, Apple is now offering their WWDC '10 videos to registered Apple Dev Connection users for free. I'm right now downloading everything to do with Safari and iOS because if this is a mistake on their part, I'd still love to see the content.

So, I think a HTML5 OutGuage system is in order for the iPhone, who is with me?!
the HTML5 one is easy.. just I think it'll be slow as you're going to use AJAX requests.. a native version would be better.. but I'm not smart enough... I do have a ****ing paid dev account though, so I should learn sooner than later.
Quote from dawesdust_12 :the HTML5 one is easy.. just I think it'll be slow as you're going to use AJAX requests.. a native version would be better.. but I'm not smart enough... I do have a ****ing paid dev account though, so I should learn sooner than later.

I don't have a paid account. They seem to be offering these for free ... That or, I'm going to be very surprised if my bill comes in and I'm $100 poorer.
Its too early to use HTML5 - because not all phones are expected to support HTML5 right away....

Use XHTML 1.1 for another year or two - or have a template engine that swaps between XHTML1.0 <--> HTML5

Otherwise some people will have issues
Except Codie.. most phones now support HTML5. iPhone is the pioneer with Webkit in Safari. It supports basically everything HTML5 does. Android is somewhere close behind with their Webkit builds. Windows Mobile there are some Webkit browsers available and soon.. The new Blackberries will have a Webkit browser as well.

Effectively, they all have Webkit, which means they all have awesome HTML5 support.
Quote from dawesdust_12 :Except Codie.. most phones now support HTML5. iPhone is the pioneer with Webkit in Safari. It supports basically everything HTML5 does. Android is somewhere close behind with their Webkit builds. Windows Mobile there are some Webkit browsers available and soon.. The new Blackberries will have a Webkit browser as well.

Effectively, they all have Webkit, which means they all have awesome HTML5 support.

Thank you for making my point for me, so I did not have too. On a side note, I hate SVG (as it seems very unwieldy right now). I wonder if the spec is as bad as some of the output files I've seen thus far.
Quote from Dygear :Thank you for making my point for me, so I did not have too. On a side note, I hate SVG (as it seems very unwieldy right now). I wonder if the spec is as bad as some of the output files I've seen thus far.

And that mean everyone is gonna buy a new phone as soon as it is released just because of HTML5?

I doubt that much.

Thing about the large percentage of people that will be on XHTML1.0 phones - especially the unlucky ones that use embedded browsers - not all of them have 3D or Wireless broadband - in in some counties - are very unlikely to update their browsers on the ones that support update downloads.


RSA for example - bandwidth is crap - and expensive - and is GPRS half the time.

Backwards compatibility is a standard and unspoken rule - particularly with CSS


- if It doesn't degrade well - alot of people are gonna miss out for some time.


U should at least have HTML1.1 fallback . Going HTML 5 is also pointless to force if u don't use alot of it's features.

EG: degradability by using <div> tags instead of <article><description><footer> etc..... or have a regex-replace if the browser string reports a non HTML 5 browser....


If someone who is as poor as me is excluded from the audience - they will look for another service, if they one they looking at now is absolutist will not cover at least 2 years backwards comparability.
Quote from CodieMorgan :U should at least have HTML1.1 fallback . Going HTML 5 is also pointless to force if u don't use alot of it's features.

You've mentioned XHTML1.1 in two posts now, I hope you're not serving it as text/html and also waiting for XHTML2.0
Quote from E.Reiljans :http://blog.sucuri.net/2010/06 ... es-interesting-stats.html

Looks like totally free and open-source nginx has almost same market share as IIS.

Well I guess, but given how many web servers there are in the world, a 3% difference still tallies to tens of millions of servers, so not really that close. What's probably more interesting is how far behind everyone else seems to be...
I had some great lines in this post that I just deleted (I typed it up, but did not bother posting it as it was pretty blunt. I'm just a little too tired to type right now, and smooth myself out as so not to offend. So, I'll say this, when I'm doing a personal project I shoot for the stars. I want to see how far the tech as come, and I want to see how far it can take me.

When I'm working, getting paid to produce code, I agree with everything you said ... to an extent.

-- Have a good night guys, I'm on my ambulance in about an hour or two, and I need a nap before I step foot on it and see my first patient.
Quote from DarkTimes :Well I guess, but given how many web servers there are in the world, a 3% difference still tallies to tens of millions of servers, so not really that close. What's probably more interesting is how far behind everyone else seems to be...

And stats for 1000 server don't mean anything for "tens of millions"

That's like saying "The coin landed on heads twice so it is 100% it lands on heads for 200 tosses"
Quote from DarkTimes :What's probably more interesting is how far behind everyone else seems to be...

That's because all shared hosting providers use apache2 due to compatibility (for example, MediaWiki prefers Apache2 with mod_rewrite).
For most common tasks, nginx is still way better. Even when serving static content, for example - our firms' server connected to 100 mbit/s
dedicated line was giving out around 600-700 GiB per day with apache2, and around 1.0-1.1 TiB per day with nginx. With apache2, CPU was
the bottleneck, with nginx, only network connection was (it was using only 20% of CPU and 15 MB of RAM!)
Quote from E.Reiljans :Even when serving static content, for example - our firms' server connected to 100 mbit/s
dedicated line was giving out around 600-700 GiB per day with apache2, and around 1.0-1.1 TiB per day with nginx. With apache2, CPU was
the bottleneck, with nginx, only network connection was (it was using only 20% of CPU and 15 MB of RAM!)

That's a damn impressive stat! I've never heard of nginx, I'm going to have to look this up!
@Dygear, better delete your post :P

You didn't hear about nginx? It's (like for me) best alternative for Apache. It support something like mod_rewrite and you can easy migrate from Apache to nginx setting nginx as proxy.

The Off Topic Programming Thread!
(309 posts, started )
FGED GREDG RDFGDR GSFDG