A U-Bend In The Tubes

Tuesday, December 15, 2009

Buying ‘Killing In The Name Of’ Makes You Just As Fuckin’ Lame As Any Of Simon Cowell’s Bullshit

Now I know quite a lot of you are going to be tarred with this brush, but fuck it. You need telling.

IF YOU BUY ‘KILLING IN THE NAME OF’ WITH A VIEW TO STOP SIMON COWELL FROM GETTING A CHRISTMAS #1 THEN YOU’RE A TOOL FOR THE FOLLOWING REASONS

  1. Why be pissed at Simon Cowell for being a rich smug cunt, yet gift an extra (Cowell’s bands and Rage being on the same label and all) couple of million to Sony records, who are a major part of the music industry being fucked anyway?
  2. You’re not taking any money away from the swarthy impressario bastard – if anything, MORE ten year olds are going to buy his shite to try stopping you, making SC MORE MONEY.
  3. You’re also giving money to Steve Jobs, and bearing in mind that an iPhone costs $200 to make and is sold in the US at $599, and in the UK at £599 (contract free), the smug turtle-necked bastard has enough money from social trending morons.
  4. I’m pretty certain, that despite all the talks of “neck and neck” sales, there are more stupid 14 year old girls than there are people who sort of pretend to have a sense of humour and just do what their friends and alt-media tell them to.

  5. It’s totally different to get bought up into the Rage against the machine hype bullshit, as opposed to the X-Factor hype bullshit. I mean… It’s COMPLETELY DIFFERENT!!.

  6. Lastly, and most galling to me – Do you people buying ‘Killing In The Name Of’ even give a crap about music charts? No, chances are, you don’t. You’re trying to stick it to a repellant little man (which I understand), but it’s a battle you’ve lost, he already has the whole thing sewn up, and has done for years. Music charts = dead to real music. Let him have it, your actions are undignified.

This doesn’t include all the hate I have for legal MP3 downloads and Rage themselves, but those’re a whole different set of issues.

FFS, people…

posted by Bradshaw at 09:56  

Friday, July 24, 2009

M$-SQL Server GO Keyword is a badly thought out piece of shite.

Just a quick one. The database for my company’s main software product uses M$-SQL, since every two bit company in the universe has a license for it kicking about somewhere, and while adding my changes to the migration script I discovered that the ‘GO’ keyword makes declared variables go out of scope, thus:

DECLARE @ID uniqueidentifier

SELECT @id = FOO.id
    FROM DataEntityExtractors FOO
    WHERE FOO.id = 'id'
GO

PRINT @ID
---------------

Error: Must declare the scalar variable "@ID".
SQLState:  S1000
ErrorCode: 137
Error occured in:
PRINT @ID

To make it work you need to move the ‘GO’ to a point in the script where you don’t need the variables anymore:

DECLARE @ID uniqueidentifier

SELECT @id = FOO.id
    FROM DataEntityExtractors FOO
    WHERE FOO.id = 'id'

PRINT @ID
GO

Is a version of the first query that will work.

Goddamn I hate M$-SQL. Hate it so very, very much. No idea why you need to second guess the query compiler before you can get stuff to work.

Meh.

posted by Bradshaw at 15:24  

Wednesday, July 22, 2009

I hate the Hibernate elements keyword

Not much going on in Bradshaw land at the moment. Working on a whole heap of logically interesting bugs that just use standard-ass java constructs, so there’s not much to update. I just spent an hour shouting at Hibernate over something I really should have known before, but somehow managed to avoid learning.

If you want to do an ‘IN’ query on an object that has a Collection as a field you need to use the “elements” keyword: thus.

SELECT
  foo
FROM
  Foo foo
WHERE
  :bar in elements(foo.barList)

Woo!

posted by Bradshaw at 10:43  

Wednesday, July 1, 2009

Fixing Linux terminals after ‘cat’-ing a binary file

Not really a development thing, but whatever…

Everyone who uses Linux on the command line will hit this one at one point or another – You ‘cat’ something, discover it’s a binary file, then discover it’s completely fucked your terminal, thus:

screwedbinaryterminal

Not so very long ago I used to close and restart the terminal, for I am very, very lazy. Then I discovered what the fix was because I am awesome.

There are two solutions to this problem:

1. Use the ‘reset” shell command

% reset [return]

OR

2. Issue the following set of commands (working blind)

% cat [return]
% [ctrl o] [return]
% [ctrl d] [return]

Shazzam:

fixedbinaryterminal
Just for the record, if you feel like breaking it again, run the same set of commands listed above, replacing Ctrl-o with Ctrl-n

posted by Bradshaw at 11:14  

Friday, June 26, 2009

The Return

So. Two asinine celebrities down and everyone, (including me, to my unending and eternal shame) sit round and gape with mouths open. Still, life goes on.

I’m back, mainly because I paid my server bill after a whole sodding year, and don’t have to duck my virtual landlord any longer.

Got all kinds of tips and tricks on the way. Watch this space.

posted by Bradshaw at 00:01  

Friday, January 9, 2009

Microsoft users. Eating shit and loving it.

Now, I’m not sure if I qualify as a Linux fanboy (I think Microsoft is utter bullshit, everything they do is substandard and available in a better for form, for less money, or free, somewhere else. Doesn’t have to be Linux, but it’s the best of the current crop, imho…), but I don’t think I’ve ever seen the level of wankface tosspot Microsoft fanboi-ism You’ll see here.

And I know why this is… These people are just plain thick. Not unintelligent, just. Fucking. Thick. How can you validate that something is properly put together if you can’t see *how* it’s put together, but instead let someone with a vested commercial interest in that thing tell you it’s better than ever, despite overwhelming evidence to the contrary?

To put it in context, this is like a restaurant charging you for an apple pie that tastes remarkably like dogshit, but the restaurant advertises so much that you’re convinced it’s a good one. You know you’re not allowed to ask to see the recipe, but the manager tells you it’s made from only the finest apples.

Six months later, you go back to sample a new refinement of the pie and discover that it still tastes like shit. But this time it’s horse shit. You’ve been told that the recipe is better, and they made some ice cream once that you thought was OK, so you’re inclined to believe them.

Over time, you gradually find yourself thinking of apple pie as tasting like shit, to the level where you just can’t wait to wolf down that next stinking nugget.

The restaurant allows you to rent their equipment to make more recipes that they will sell in their restaurant, but because it’s their restaurant, everything you make still tastes of shit. Horseshit, batshit, panda shit, and most of all bullshit.

Eventually, a friend of yours tells you about a different restaurant, where you don’t pay for the food, but you can work off your meal in the kitchen. You don’t know how to cook, those guys are kinda hippies and your palette is screwed from eating all that shit, so you pass. Then you laugh about food that doesn’t taste like shit, because you’re convinced that actually, it’s really, really tasty. The manager, radio, TV and some of the other part time chefs told you so.

I mean, everyone eats there, right?

posted by Bradshaw at 12:17  

Thursday, July 17, 2008

The “selected” variable in eclipse Core Expressions

A couple of days ago I posted a little something about Contexts in the eclipse Core expressions framework. What I said was the only thing you were probably interesting in the standard ISource was the “activeContexts” variable. That  was a little misleading of me. There  are several that are potentially useful, but I’ve not been using them, since what I’ve been working on doesn’t really lend itself to most of them.

The “selected” variable lets you access whatever is “globally selected” under your mouse. Depending on the view you’re acting on it can consist of 0 or more entries of type “Whatever”.

As I have written previously, if you’re working on a View whose selection can affect the whole application, then you’re going to need to add:

getSite().setSelectionProvider(viewer);

Somewhere in the ViewPart class. All this does is register that viewer as a SelectionProvider with eclipse in its ISelectionService. That Viewer can now make its selections known to the UI itself.

To make use of this, you’ve got to delve into the Core expressions. The easiest thing to do is to create a “definitions” extension point and create the expression in there – that way you’ll be able to reuse it. One I’ve used is:

<definition
  id="category.definition">
  <iterate ifEmpty="false" operator="or">
    <instanceof value="TreeNode"></instanceof>
  </iterate>
</definition>

This one basically says “If anything out of what I have selected is of type “TreeNode” then this expression evaluates to true. In order to use this with a Handler, you’d use the following…

<activeWhen>
  <reference definitionId="category.definition"></reference>
</activeWhen>

Makes sense, no?

posted by Bradshaw at 09:19  

Wednesday, July 16, 2008

Finally, some style changes

I’ve finally made some changes to the look of the site. These are:

  1. I’ve moved the Wordpress installation up a level, and stuck a 301 redirect in the .htaccess. Watch Google b0rk like a muthafucka.
  2. Replaced an h1 header with my awesome logo, that was awesome when I made it, but is of too low a resolution. Annoyingly I can’t remember how I made it and I’m shit with photoshop. This will probably get redesigned soon enough…
  3. Fiddled with the Wordpress theme. It now defaults to a width of 800, not 660. Anyone still running their monitor at 800×600 can shove it up their arse.

Now I guess it’s Wordpress upgrade time…

posted by Bradshaw at 08:49  

Tuesday, July 15, 2008

Using “selection” variable for Viewers in Core Commands

I’ve just spent an hour and half on this one…

If you want the eclipse UI to know what you’ve got selected under your sticky little mouse, for the purposes of Core Command checking, then you need to include something akin to this in your View class:

getSite().setSelectionProvider(viewer);

Where viewer is the name you’ve given to the viewer class (Either TreeViewer or TableViewer in most cases), otherwise eclipse won’t register your viewer with its SelectionService, and won’t know when you’ve got something selected.

Just a little something to show that I love you. Kiss kiss.

posted by Bradshaw at 13:08  

Tuesday, July 15, 2008

How to use eclipse Contexts for Core Commands

One of the things that has pissed me off more than anything else throughout my odyssey with eclipse RCP has been the utterly, UTTERLY awful documentation for the declarative Commands framework. I’m sure you know the basics…

  • You define “Command”s as xml entities through your plugin.xml / extensions browser. They shouldn’t contain anything more than presentation information. They are then included on menus and Tool/Coolbars.
  • Unless there’s some behaviour associated with that “Command” that is Always available – where you provide a link to the class that implements that behaviour as a “Default Handler”
  • A Handler is the implementation that is associated with a given Command. If they’re not always available, then they should be defined in the “Handlers” extenstion point.

Now, this is where it got me… Most of the time you need to stop idiot bastard users from clicking on the “Commit” button when there isn’t a Database connection, or whatever. So you need to ghost the menu / toolbar items, right?

However, in eclipse, you don’t get hold of the widget itself and set it to a “ghost” state, you actually need to disable the implementation, so that there are no active handlers for that Command. The Command itself is still there, but since eclipse hasn’t got anything for it to do, it’s disabled, right?

OK – so here’s the thing. There’s an arcane language for logical assessment, all part of the Core Expression Framework. Just so you don’t think I’m being mean for the sake of it, this is the eclipse wiki page for it:

http://wiki.eclipse.org/Command_Core_Expressions

Clear as dogpiss? Hmmm?

(more…)

posted by Bradshaw at 09:59  
Next Page »

Powered by WordPress