<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Talk Unafraid &#187; code</title>
	<atom:link href="http://www.talkunafraid.co.uk/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.talkunafraid.co.uk</link>
	<description>The (occasionally coherent) ramblings of a geek</description>
	<lastBuildDate>Sat, 07 Jan 2012 22:24:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The real problems behind CCP&#8217;s botched forum launch</title>
		<link>http://www.talkunafraid.co.uk/2011/04/the-real-problems-behind-ccps-botched-forum-launch/</link>
		<comments>http://www.talkunafraid.co.uk/2011/04/the-real-problems-behind-ccps-botched-forum-launch/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 17:28:00 +0000</pubDate>
		<dc:creator>James Harrison</dc:creator>
				<category><![CDATA[EVE]]></category>
		<category><![CDATA[ccp]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.talkunafraid.co.uk/?p=1307</guid>
		<description><![CDATA[Okay, so this blog, back in the days of old, used to talk about EVE a lot. Now, I don&#8217;t play EVE &#8211; I haven&#8217;t for well over a year. I stopped playing because I lost all faith in the company that runs it, CCP Games hf. At one point I was choosing an education [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so this blog, back in the days of old, used to talk about EVE a lot. Now, I don&#8217;t play EVE &#8211; I haven&#8217;t for well over a year. I stopped playing because I lost all faith in the company that runs it, CCP Games hf. At one point I was choosing an education and career path that would set me up nicely to apply for a job at CCP, which should give you an idea of how big a change it was from huge advocate of EVE to what&#8217;s known in the community as a bittervet &#8211; a bitter veteran. That a term exists for this type of player says a lot.<span id="more-1307"></span></p>
<p>Recently, CCP decided to ditch their old forums (ASP, around 10 years old with little to no updates in that time) and started work on a new forum system. They&#8217;d just launched EVE Gate, which is a fairly minimal but working social network for EVE, and allows you to view some in-game features out of game. Many people decried EVE Gate, saying CCP should have just focused on building a better API first- then making their own CCP-owned apps on top of the API. Still, EVE Gate was done and launched to a minor fanfare. Some people use it a lot (in-game email is a handy thing to have at work), but many people ignore it outright.</p>
<p>What was shouted about most on the forums was the investment of time and effort from CCP to produce a very minimal site, features-wise. EVE has a stellar (no pun intended) community, with some very bright minds in it, who have built some fantastic apps on top of a fairly limiting API, and done so in their own time as a hobby project. Sites like EVE Metrics, EVE Commander, and such were all cited as examples of this- people were whipping up massively more complex and powerful sites than EVE Gate in their spare time in a matter of months, so what took CCP so long?</p>
<p>Well, the same people who developed EVE Gate (to my knowledge) were applied again to a web based problem; new forums. Now, a logical thing to do would have been to build on EVE Gate, and to add forums directly to that. This means you&#8217;d have only one core framework of software to debug and worry about, your authentication (a huge consideration for games like EVE) is all in one place, and in terms of validation and security testing there&#8217;s less to go wrong and fewer places to look when the shit hits the fan.</p>
<p>But CCP&#8217;s Web Cell did not. They sank a colossal amount of time into the project; the number being thrown around is 72,000 man-hours, which sounds about right to me given when they started and how many people are working on it. 72,000 man-hours is huge. Months and months and months and months. Forums are not complicated beasts; they&#8217;re essentially a simple relational DB application. You have to apply some thought about formatting (implementing bbcode or something like Markdown/Textile), accounts, profiles, all that sort of thing, but everything boils down to very simple structures, and simple code. There&#8217;s nothing complex, really.</p>
<p>CCP has one extra thing to think about atop of most forums: Integration of EVE accounts and characters. You have to be able to log in, and select a character to post as. But with EVE Gate, they had all that already done and dusted. And, crucially, fairly well tested- exposed to the world for a good long while. But again, this is all quite simple stuff.</p>
<p>But the web cell still managed to botch the job. And not just a half-arsed botch. Oh no.</p>
<p>They didn&#8217;t decide to integrate with EVE Gate. They completely ignored it, in fact. They took an existing ASP.NET forum software package, Yet Another Forum, and then skinned it. They just made a CCP skin for it. But that&#8217;s not all they did- they also gutted parts of it to tie in the authentication system, filling massive chunks with serious security flaws.</p>
<blockquote><p>At approximately 21:00 UTC on Friday, April 8 we were made aware of some security issues with the new EVE forums which needed to be addressed. These issues were as follows:</p>
<ul>
<li>We discovered that it was possible to access some forums which certain users should not have been able to access</li>
<li>Users could make and edit posts as another user&#8217;s character</li>
<li>It was possible to inject some HTML code into signatures</li>
</ul>
</blockquote>
<p>At this stage the competent web developers (and software developers in general) are staring blank-faced in incomprehensible confusion. How could a 600-man industry-leading corporation like CCP let this sort of thing slip?</p>
<p>Authentication was done by cookies. That means there was a client-side cookie which stored your character ID. Change that, and you could appear to be logged in as anyone. And act like it, too- this wasn&#8217;t just a display bug. Change yourself to the CEO of CCP&#8217;s character, and you could see all the private internal forums. And the admin panel. And you could ban people! Handy.</p>
<p>Editing posts was unauthenticated. You could be logged in as you, edit your post but then change the post ID in the edit URL to the post you wanted to edit. And hey, no questions asked &#8211; go right ahead!</p>
<p>And finally, at least one HTML injection flaw. Why? Because HTML is used for formatting.</p>
<p>Now, these are all mind-blowingly simple &#8216;My First Website&#8217; cock-ups. Any competent developer who had knowledge of programming web applications would never have made any of these mistakes. So why are there no competent developers in the web cell?</p>
<p>Here&#8217;s a clue. CCP Games hf is based in Iceland. Chances are, you&#8217;re relocating to take a job, and that relocation is putting you in a country far, far away from wherever you used to live. That&#8217;s a massive downer for potential employees. Next, the other part of the puzzle: I currently do freelancing. With a few clients on the go at once, doing roughly 20 hours of work a week during holidays as a student, per year I earn well in excess of what full time employees of CCP&#8217;s web cell get paid. I&#8217;m not even out of university yet. There&#8217;s one other thing to consider, especially now: CCP is not the sort of company that looks good on your CV any more. There&#8217;s some incredibly smart people working at CCP on some incredible stuff. But their reputation is tarnished, almost beyond repair, by this sort of fuck-up. Having CCP on your CV is something you want to think twice about. And working somewhere that triggers that sort of thinking is not looking great, is it?</p>
<p>And last but not least, have a look at the <a href="http://www.ccpgames.com/en/jobs.aspx" target="_blank">CCP Jobs</a> website. Check out the requirements for a web developer:</p>
<blockquote><p>Required Experience/Background/Skills:</p>
<ul>
<li>B.Sc. in Computer Science or related field, or equivalent training and professional experience</li>
<li>2+ years of experience developing &amp; implementing .NET based web solutions</li>
<li>JQuery, JSON, JavaScript, ASP.NET, MVC, C#, Visual Studio 2010, HTML/DHTML, MS SQL Server 2008, T-SQL</li>
<li>Strong communication skills &#8211; verbal and written</li>
<li>Strong technical and analytical ability</li>
<li>Ability to complete projects on a timely basis with an attention to detail with minimal supervision</li>
</ul>
</blockquote>
<p>Now, there&#8217;s a bunch of problems here. Firstly, their HR people clearly do not know what makes a good web developer. Listing DHTML is cause for concern &#8211; it&#8217;s a buzzword from the 90s, nothing more. Personally speaking I have great concern for people who have only been using Microsoft toolsets, particularly for websites, and I&#8217;ll go into this a bit more in a second. The other problem with the above list is that, BSc aside, if they were willing to overlook my lack of experience with things that didn&#8217;t exist back then, I&#8217;d have been qualified at age 15 or so. And then the last bit: &#8220;attention to detail with minimal supervision&#8221;. That&#8217;s <em>very</em> worrying.</p>
<p>It&#8217;s worrying because it implies that these underqualified, fresh-out-of-school/university undergraduates who have potentially never written a public-facing website are not going to have their work checked. That&#8217;s a clear, utterly obvious problem. That&#8217;s saying &#8220;You&#8217;re confident you&#8217;re good enough to not need a supervisor keeping track of your output&#8221; to someone who probably has a healthy ego on them but in reality could be utterly useless.</p>
<p>The all-Microsoft toolchain that CCP uses and requires people to know is all well and good, but security has never been in the forefront of Microsoft&#8217;s brain. Specifically, tools like Visual Studio and ASP.NET for web developers focus on making life easier. Reducing the amount of work you have to do and increasing the amount of bolting together existing bits and pieces. This hides the underlying reality somewhat, though, and can lead to people just not being aware of things like client-side cookie tampering or cross-site scripting. Malformed HTML just isn&#8217;t something most MS web devs really think about- not till they&#8217;ve had a few rounds of learning the hard way, at least.</p>
<p>This is just my personal experience, based on people I&#8217;ve worked with and projects I&#8217;ve had to work with in the past. If you hire people who did their first major websites using a text editor, you&#8217;re likely going to get people with more knowledge about <em>why</em> things work, and can better understand how people can attack their nice shiny working things. And that makes you a better programmer. It&#8217;s one of the reasons I prefer working with Django/Rails/Sinatra- none of these things hide code from you. They may let you generate code with helpers, but even that is merely convenience- you have to know what the helpers to do to be able to use them, at a code level. Dragging text boxes onto forms does not give you the same experience of interacting with the code directly, and abstracts a lot of important stuff away from you. The result? Worse code.</p>
<p>CCP was very proud at fanfest of the fact they&#8217;ve now got over 600 people in the organization. But what sort of people? And why so many? Sure, a goodly number of those people will be DUST and Incarna developers and artists and so on. And you&#8217;ve got admin people to go with that all. But CCP&#8217;s first website was done by far fewer people than are currently on the web cell. And say what you like about 10-year-old forums, they work, a point made loudly by many forum users. CCP could perhaps do better by hiring fewer people, but people with better real-world experience.</p>
<p>So, the real screw-up here was not a purely technical one; it&#8217;s much more about the people who are behind the tech. And CCP is going to find themselves in a bad place on that front in very short order, because nobody <em>except</em> fresh-faced undergraduates is <em>stupid</em> enough to <em>want</em> to work for CCP right now. And I hate myself a bit for saying that, but it&#8217;s true. CCP is becoming a liability to itself through its own actions. And like all bittervets, I only whine and complain and point out this sort of thing because I fundamentally love EVE. It remains the only MMORPG that transcends being an actual game and takes on a life of its own. But with CCP at the helm, the world is in perilous danger of being torn to shreds by the very entity that created it. Which would be a terrible shame.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkunafraid.co.uk/2011/04/the-real-problems-behind-ccps-botched-forum-launch/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The importance of APIs in broadcast</title>
		<link>http://www.talkunafraid.co.uk/2011/01/the-importance-of-apis-in-broadcast/</link>
		<comments>http://www.talkunafraid.co.uk/2011/01/the-importance-of-apis-in-broadcast/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 07:17:32 +0000</pubDate>
		<dc:creator>James Harrison</dc:creator>
				<category><![CDATA[Code Snippets and Examples]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Radio]]></category>
		<category><![CDATA[Servers and Software]]></category>
		<category><![CDATA[am]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commentary]]></category>
		<category><![CDATA[dab]]></category>
		<category><![CDATA[fm]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[myriad]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[rambling]]></category>
		<category><![CDATA[rds]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[tcpip]]></category>

		<guid isPermaLink="false">http://www.talkunafraid.co.uk/?p=1221</guid>
		<description><![CDATA[We use a program called Myriad for all our broadcast automation, asset management and general playout purposes. It&#8217;s made by a company called P Squared, who are a very able and friendly bunch of people and who make ultimately a fairly decent product. However, as with anything these days, a single app isn&#8217;t sufficient no [...]]]></description>
			<content:encoded><![CDATA[<p>We use a program called Myriad for all our broadcast automation, asset management and general playout purposes. It&#8217;s made by a company called P Squared, who are a very able and friendly bunch of people and who make ultimately a fairly decent product.</p>
<p>However, as with anything these days, a single app isn&#8217;t sufficient no matter how good the app is. The expectation to end users is that everything should play together nicely and you should be able to get data from A into B with a minimum of fuss. And as a developer, you clearly want to enable this- it means your app has more happy users, and if your app is commercial that translates to more cash. If you make a really, really good API then you can end up with a veritable ecosystem around your app; other companies pouring money into development, all supporting your business. So APIs are good for business.</p>
<p>But more importantly APIs are good for consumers. If you&#8217;re listening on your DAB radio or (in our case soon, with any luck) an RDS equipped FM radio, you want some metadata. Who are the presenters you&#8217;re listening to? What&#8217;s this song? Listening online? Then you want the song title. This is all pretty basic stuff we&#8217;ve come to expect thanks to media players on computers. If you&#8217;re a big company like the BBC you just adjust your tools and systems to support the APIs you need, or specify them in your requirements to outside vendors and get them to add support. But what about the little guys?</p>
<p>P Squared have made a good step in the right direction as of their last major release of Myriad; they added a TCP/IP interface that lets you query Myriad for some basic variables. Through a fairly bodged-together little set of scripts we can get data out of Myriad like what song is playing now, and what&#8217;s coming up. But it&#8217;s still awkward.</p>
<p>So I whipped up a little Sinatra webapp that does the appropriate little dance to act as a gateway to that awkward TCP/IP gateway from the land of HTTP. Everything speaks HTTP, or can be prodded to speak HTTP quite easily. It&#8217;s far and away the best tool for interacting between applications, since it&#8217;s well understood and simple to understand. Now I can have a script poke Myriad and our website&#8217;s API, combine the two, and suddenly all our metadata can be updated: &#8220;There Will Be Cake with James Harrison: Around The World (Radio Edit) &#8211; Daft Punk&#8221;. And while there&#8217;s absolutely no need to tell people the name of that particular song, we&#8217;re still adding a lot of value by providing more interactivity to our listeners through updated content. And hell, it&#8217;s just more professional. Click through for the scripts.<span id="more-1221"></span></p>
<p><script src="https://gist.github.com/769210.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkunafraid.co.uk/2011/01/the-importance-of-apis-in-broadcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EVE Metrics and popularity</title>
		<link>http://www.talkunafraid.co.uk/2010/10/eve-metrics-and-popularity/</link>
		<comments>http://www.talkunafraid.co.uk/2010/10/eve-metrics-and-popularity/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 01:55:45 +0000</pubDate>
		<dc:creator>James Harrison</dc:creator>
				<category><![CDATA[EVE]]></category>
		<category><![CDATA[EVE Metrics]]></category>
		<category><![CDATA[MMMetrics]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[ccp]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commentary]]></category>
		<category><![CDATA[eve metrics]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[stuffisawesome]]></category>

		<guid isPermaLink="false">http://www.talkunafraid.co.uk/?p=1111</guid>
		<description><![CDATA[Well, it&#8217;s been a while. I&#8217;ve been busy with things in this nasty place called reality which has been kicking my ass as a result with all sorts of fun ailments. Recently though I was forced to pay a bit more attention to EVE and specifically EVE Metrics. A couple of months back we worked [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been a while. I&#8217;ve been busy with things in this nasty place called reality which has been kicking my ass as a result with all sorts of fun ailments. Recently though I was forced to pay a bit more attention to EVE and specifically EVE Metrics.</p>
<p style="text-align: left;">A couple of months back we worked with E-ON to put an advert in the magazine as well as running a login screen advert, and this has now run. So for a few days anyone logging into EVE will have been greeted with this fine advert created by Zapatero at MMM Publishing.</p>
<p>Of course, this suddenly meant more people going to and using the site. Fortunately one of the primary concerns when myself and Makurid put EM2 and later EM3 together was scalability. Whereas EM1 would&#8217;ve fallen over and died, EM3 has soldiered on like a champ. The only intervention we&#8217;ve had to perform was to fix the API processor, which was hanging regularly and causing problems as a result. That&#8217;s fixed, and we&#8217;re now stable and responsive. So, of course, we now have some numbers! These are the statistics for the most recent 30 days as of this post.</p>
<ul>
<li>~85,000 visits</li>
<li>~500,000 page views</li>
<li>~5 pages per visit</li>
<li>~29,000 unique visitors</li>
<li>~1,500 additional account registrations as a result of login screen advert (Above ~20 account registrations per day baseline)</li>
</ul>
<p>In terms of the site&#8217;s dataset, we&#8217;re getting fairly huge.</p>
<ul>
<li>6,000 EVE API keys, of which 4,000 are full keys</li>
<li>75,000 EVE API methods enabled</li>
<li>32,000 EVE API calls per hour (about 10 every second)</li>
<li>75,000 characters (includes characters noted in market and other data)</li>
<li>15,000,000 wallet journal entries</li>
<li>6,300,000 wallet transactions</li>
<li>200,000 EVE Mails</li>
<li>1,600,000 active market orders</li>
<li>6,400,000 EVE API loaded trades</li>
<li>52,000,000 Inferred trades</li>
<li>11,000,000 processed uploads</li>
<li>146,000,000,000 total skillpoints of loaded characters</li>
<li>4,100,000,000,000 total ISK of loaded characters</li>
</ul>
<p>Which is&#8230; scary. But! We&#8217;ve grown hugely (a threefold increase in requests per second) and we&#8217;re still performing well. The site is not throwing errors, users are generally happy with their experience with the site, and we&#8217;re stable &#8211; no crashes, no fires breaking out, no climbing resource usage. Our caching and design philosophies have worked well and the extra effort invested earlier in development has really paid off. We&#8217;ve just handled a huge amount of growth with no effort at all. I&#8217;d estimate we&#8217;re good to around 12,000-15,000 users on our current hardware.</p>
<p>Of course, we&#8217;re now wondering what to do. I stopped playing EVE long ago aside from the odd spot of tinkering, but I&#8217;ve even let accounts lapse and stopped updating my skill queue as of a month or two ago. Makurid&#8217;s just started playing again recently. We&#8217;re not really heavily invested in EM in terms of motivation, other than making a cool webapp.</p>
<p>Capsuleer, as I&#8217;m sure many of you know, is an EVE iPhone app that recently shut down because it couldn&#8217;t be monetized and the time and money invested in it by the developers was simply unreasonable. A couple of weeks back I was looking at the realities of what EM costs to run, and what it costs in terms of time to maintain. And the logistics of, if needed, shutting the site down. This is still somewhat in my mind but the site will be sticking around for a little while yet. I&#8217;m very much hoping CCP will come to their senses in terms of how they choose to support third party developers (a free account subscription appears to be the greatest gift given by CCP, but that&#8217;s a far cry from the ~£130 per month it costs to run EVE Metrics &#8211; and that&#8217;s just our costs _now_, not including new hardware costs or upgrade costs. If we grow much more we&#8217;re going to be looking at ~£200/mo to run EM, possibly more). Advertising isn&#8217;t an option, and donations have failed every time we&#8217;ve tried to support ourselves with them. Timecode sale affiliations barely made a mark on my accounting sheets. We do enjoy writing sites and producing something big that people find useful, but there are certain realities to be faced &#8211; both myself and Makurid are students, with no full-time jobs. I&#8217;ve recently picked up some part time work which means I can now afford to buy bacon on a weekly basis again.</p>
<p>In the meantime we will continue to support the EVE community by maintaining EVE Metrics. We&#8217;re working on the codebase right now to upgrade it to the latest and greatest Rails release and Makurid&#8217;s beavering away at the API processor to split it up into a puller and a processor, enabling us to achieve much higher throughput on API calls to CCP&#8217;s (slow) servers. Now that we&#8217;ve breached 30,000 requests per hour, that 10 request per second figure is actually beyond our capacity right now because of our single-threaded processor/puller mechanism. This is actually a CCP limit- we just need to work around it by hitting them with more requests simultaneously, thus spreading our load over multiple servers on their end. I&#8217;ll also be making performance and usability improvements wherever I can and incorporating as many bug reports as possible into what we release. This will likely be a slowish process, but in the long run, it should be worth it. The question really is, will CCP make it worthwhile for us to be investing our time and energy into longer term planning?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkunafraid.co.uk/2010/10/eve-metrics-and-popularity/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

