Looks up and around…

•May 24, 2010 • Leave a Comment

Hey there kids! long time no see🙂

So, another year, another job. Like I mentioned in the last, long ago post the place I was working became… all of a sudden.. very strange. As the IT guy there I was asked to do some… things that I wasn’t overly comfortable with. Nothing illegal, but when the owner of your company calls you into his office, shuts the door (always a bad sign) and instructs you (and yes, it was made perfectly clear it was an instruction, not a request) to perform digital surveillance of the supplied list of employees, one of which has become a close friend, it sets off so many ‘dodgy alarms’ it’s not funny.

The reason for this odd, Stalin-esque behaviour all became clear when a general staff meeting was called, and it was announced that recently, 3 companies were formed, and assets quietly moved from the parent company into them. The parent company was then liquidated, taking all of the debts with it.

The legality of this move is borderline… morally it’s hideous. The surveillance, as it happens was to ensure that creditors didn’t get wind of what was going on. Some people were friends with, or had family members involved with creditors. You can imagine the scramble to collect if this sort of information got out- this is a small town and there very well may have been a lynching.

So, it all became a bit weird for this particular Aussie. I got very good at keeping my mouth shut, mostly by putting enough food in it that I put on 10 kg (I don’t smoke anymore so I needed *something* to replace Mum’s nipple when I’m stressed) , and my home life suffered… I became so used to keeping secrets that I would hide stuff from Sally, for no other reason than an instinctive need to avoid confrontation (note to self- don’t do this again. She’s going to care more about being lied to than the fact you drank the last of the milk).

And, quietly, I made plans for escape. Lunches took a little longer (but no too long) for meetings and interviews, resume’s were posted… and finally I was offered a position at a training company owned by the local University.

Notice was duly posted at my last job- which made the boss actually cry- he couldn’t, for the life of him, fathom *why* someone would leave that workplace, after all, on average, we got the correct pay (but not always on the right day), and what about the bonuses in my contract? and then I pissed off as quick as I felt I could, knowing that I wasn’t going to see any benefits or entitlements.

The letter I got a week after I left, outlining the fact I was fired for ‘gross misconduct’, rather than resigning, with all the implications being fired has, confirmed this suspicion: the fact I was left on the payroll for a full fortnight after I left, essentially giving me what I was entitled to, told me that whomever is running the universe has a particularly wicked sense of humour🙂

So, now I’m here, in this magical new workplace. It’s strange- I’m seeing procedures followed, the new boss is extremely hands off (after all, she says, if I didn’t know what I was doing it would be pretty obvious pretty quickly), I’m seeing a clear, consistent management style, and a business model that actually works.

I’m also seeing a bigger pay packet🙂

I’ve also come full circle, in a way- when I was a much younger, and less annoyed aussie, I had my first real job at WEA Hunter (a training company), first as a ‘logistics officer’ (ie, janitor), then as a trainer in I.T., then as an I.T. maintenance consultant, and it was lovely. The people rocked, the management effective, the location, just around the corner, in fact, if I hadn’t chased Sally to the Northern Territory I’d be there still.

And it kinda ruined every job I’ve had since- nothing has every come close to that feeling of security and purpose I had there, every boss has been less.. together than Ben Grushka (a man, whom I once saw deal with a man who was absolutely murderous with rage at something no-one quite understood: he just.. talked him down and within 10 minutes the man left with a cup of tea, a biscuit and a voucher for $10 off a self-help course. And a  smile :)) except now.

I’m not training here, however- I’m working with Moodle, a Learning Management System- basically a way of delivering lessons and doing assessments online. Perfect for distance education work… and right now, it’s my job to play with SCORM, or Sharable Content Object Reference Model– which after you cut through all the crap around it is a standard method of communicating with a Learning Management System for packages of interactive files, like Flash or an HTML file with some Java.

I hope I can chronicle my adventures a little more thoroughly now I’ve found a home… and thanks for all your patience. Even if it’s just the two of you that read this…

Shhh…

•January 9, 2010 • 2 Comments

I’m being very, very quiet, no? But, I work in a place where employees are googled. And online activities monitored. So, I’ve shut the hell up for a while, until this particular storm blows over.

ciao for now, kids…

SugarCRM and C# 2- Doing something- Logging in

•September 3, 2009 • 1 Comment

Last time, we looked at importing the SugarCRM SOAP classes into Visual Studion Express 2008. Now, let’s actually make use of it

Most of the calls use some sort of session ID, which is a string that Sugar uses to determine the validity and possibly origin of a SOAP request. The SOAP interface is, after all publically available.

This is retrieved by a logon process, as follows-

private string session;
// user auth object
private user_auth user_authorisation = new user_auth();

private void doLogin()
{
// login stuff
// authorisation object

user_authorisation.user_name = “username”;
user_authorisation.password = computeMD5String(“mysecretpassword”);
sugar_SOAP_obj.loginCompleted += new loginCompletedEventHandler(sugar_SOAP_obj_loginCompleted);
sugar_SOAP_obj.loginAsync(user_authorisation, “”);
Console.WriteLine(“login initiated”);
}

// login completed actions
private void sugar_SOAP_obj_loginCompleted(object sender, loginCompletedEventArgs e)
{
sugar_SOAP_obj.loginCompleted -= new loginCompletedEventHandler(sugar_SOAP_obj_loginCompleted);
Console.WriteLine(“Login has completed with the result:” + e.Result.id);
session = e.Result.id;
}

The MD5 hash function is as follows:

private int i = 0;
// compute MD5 string for authentication
public string computeMD5String(string PlainText)
{
MD5 md5 = MD5.Create();
byte[] inputBuffer = System.Text.Encoding.ASCII.GetBytes(PlainText);
byte[] outputBuffer = md5.ComputeHash(inputBuffer);

//Convert the byte[] to a hex-string
StringBuilder builder = new StringBuilder(outputBuffer.Length);
for (int i = 0; i < outputBuffer.Length; i++)
{
builder.Append(outputBuffer[i].ToString(“X2”));
}

return builder.ToString();
}

The code above does the following:

1) Creates a string to hold the session.

2) Creates a new user authorisation object, which contains the username and *the hashed password*- I got stuck for half a day working out it needs to be hashed!

3) doLogin populates the user authorisation object with teh appropriate values, creates a listener for the completion of teh authorisation process, then actually initiates the process.

4) sugar_SOAP_obj_loginCompleted function assigns the session string to the session variable. This looks something like ueuqq9obclhbrbrbqk1mat0s07

You may notice that there are non-asynchronous functions available, but I prefer to use asynchronous calls, because they don’t ‘hang’ the application while waiting for a long call to complete. This may save you from calls from users whinging that the application is non-responsive, and async calls allow for triggering a progress bar or ‘Please Wait’ message or something similar.

Now we’re logged in, with a session ID, we can start to do more useful things. Next time, we’ll look at adding a contact using SOAP calls.

SugarCRM and c#

•September 2, 2009 • Leave a Comment

Hi there! Long time no see!

Things are going to get a little boring, sorry kids, as my life has taken a turn for the technical and I’m going to start documenting it a bit, for my own entertainment but as well as sharing with the world what I’ve learned. Some of this is important…

I’ve been playing with SugarCRM lately, specifically with the SOAP aspect of it.

SugarCRM is sort of a funky enterprise-class customer relationship tracking database, written in php and mysql. My work has a CRM, but it’s an Access database that is full of spaghetti code that someone, no-one knows who, wrote a decade ago, and it’s dying, slowly and painfully. Hence, workign on a replacement. SugarCRM, with a little modification, fits the bill.

I’m going to modify it by using SOAP, which is a sort of ‘socket’ that the developers of SugarCRM programmed in (done in nuSOAP, something I’ve used before. It’s actually pretty rockin’, especially as Flex handles SOAP really well. The last project I did for the last mob I worked for used nuSOAP for data transfer to a php-driven database) to SugarCRM, that programming environments can use.

There’s stacks of stuff out there regarding tying in SugarCRM with php using SOAP, the best intro to which is this curious little woman called ‘LornaJane‘.

But, due to the unhealthy obsession with all things M$ here, I’ve got to use .NET. And, to make things as painless as possible, I’m going to do it in C#, using Visual C# 2008 Express.

First, we’re going to look at importing the SOAP service into Visual C#. It’s done as a Web Reference, and to add it, I selected the ‘Project’ menu item, then selected ‘Add Web Reference’.

I then entered the url of my SugarCRM instance, followed by /soap.php?wsdl , ie http://mysugarcrminstace/soap.php?wsdl

Visual C# then happily retrieved the exposed methods and properties, and made all the appropriate classes.

Next, we’ll look at actually doing soemthing with it…

What I did on my weekend

•June 25, 2009 • 3 Comments

I have a new job.

I think I mentioned that before… my last boss couldn’t manage his way out of a wet paper bag with a map in a brewery next to a brothel, but because he was a clinical psychopath this didn’t stop him from from ignoring the tax office’s increasingly strident and panicky demands, various software vendor’s legal demands for actually *buying* thier product that we use to mmake our stuff, and the complete lack of any actual business income to wank on to anyone that’ll listen about how rich he’d be, just as soon as the business took off.

So, like CinnKitty (not the same kitty as before, it seems) I jumped ship, to a lovely environmental monitoring company.

Or so I thought, the guy who had the job before I, was either a madman or a genius, had coded eveything to work, exactly as it was, forever.

Which was fine, unless you wanted to put something that wasn’t XP on the network, or upgrade to Office 2007, or, god forbid, change an admin password, killing the lovingly hand-crafted Intranet which had the domain admin password in plaintext in it, to gain write access to a protected directory.

So, it was out of the pan of evil bosses, into the fire of a place that has to be rebuilt, essentially from the ground up.

But, I not only have the might of God on my side (I’m rebuilding with Linux boxes :)) I also have a new co-worker with a powerful weapon…

Spiceworks, which, amongst other things is a ticketing system for help desk requests- and it’s seriously amazing how the help requests drop off when it’s discovered that just dropping in for a chat, and by the way the printer’s running slow again, can you just pop round and have a look? is logged and reported and accounted for.

Plus the more serious issues stay remembered- no more forgetting that you were workign on a site-to-site vpn that’s worth $20,000 a day in production for the company because someone’s 100 mb email attachment has clogged thier outbox.

Add the full time parenthood (5 months now, seems like a lifetime!) to the mix, with no respite, as his mum has actually been deployed (who’d have thought there’d be a need for short, slightly manic medics in far north Queensland? But apparently there is) and all of a sudden, I have no time for this blog..

But there’s much to tell, so very very much…

We’re talking J-lo size here

•April 9, 2009 • 2 Comments

I’ve got a big-ass new plasma TV! I’ve always wanted one! And… get this, it was free! (well, kinda, I had to set up a web filter for a community college, in exchange. For the record- SME server with Dansguardian works a treat)

The community centre where a friend fo mine works was about to chuck it out, because it was too big… so I claimed it pronto, stuck it to the wall, and plugged it in… and it works! Except…

The reason it was free, is that they also got it for nix, from Cityrail (train company). It was one of the monitors that gave arrival times.

It has burn-in…

It always tells me, in ghostly letters across the top of the screen, that it’s Arrivals, and across the bottom, that the next train is due in (blur) minutes.

Nice to know…

The moving finger, having writ…

•March 26, 2009 • 1 Comment

Moves on…

Misstress M appears to have hidden from us…

and I miss her.

Silly I know, to miss someone who I have never, and will never meet, talk to, or otherwise interact with other than via text, but I followed her antics every day at my old job. It was lovely to lose myself in her new loves, imagine myself at the beaches she photographed, cheer her on as she took on a law degree and set her sights firmly beyond the glass ceiling.

But, after the obligatory “what the fuck have i done i don’t have a sodding clue how to do this new job and they’re going to figure it out and sack me, I know it” time, which tends to last about 3 months for me , I looked up to see where my favourite soap opera was, and it was gone…

Oh well. Good luck M, I hope things are all good for you🙂