The Dangling Pointer

Sh*t my brain says and forgets about

Microsoft WCF Web Services & Java

I spent a good 50+ hours on trying to consume a Microsoft WCF secure web service with a Java solution.  I tried Spring Web Services, Axis2, and looked at Metro/Tango and decided Axis2 was the “easiest” solution.  The web service I’m connecting to implements WS-Security, WS-SecureConversation, WS-Policy, WS-Trust and WS-Addressing (at least) and it’s provided through a .NET 3.5 WCF endpoint.

It doesn’t work.

Axis2 can’t handle SpNego which is a WCF closed protocol allowing two WCF machines to negotiate the credentials between them.  The client has spent way too much money paying me to continue to figure out a Java solution, so I wrote a .NET 3.5 C# client.  Took me literally five lines of code and it’s working.  That’s great for .NET developers but a whole lotta horse shit for the rest of the world.  I’m hoping Axis2’s Rampart module is updated to play nice with WS-SecureConversation and a .NET WCF web service.  Until then, I’m using the .NET client to download the data and I’m storing the SOAP body into a database table.  On the Java side, I’m still using JAXB2 to unmarshall the data into Java objects and process it through our existing persistence framework.

Go me!

When YOU are on the Internet

I’ve never been one to give a shit about what of “me” is online.  I have blog(s), am on Twitter and many other social networking services.  Up until now, I’ve pretty much said my mind and didn’t care about the audience.  I made a judgment call error a while back on Twitter, and now I’m correcting the issue.

The question comes to be, how does one split yourself from your professional life online from your personal life?  To be honest, it’s fairly difficult if not impossible if you’re trying to keep your identity at all the same between the two.  For instance, I originally signed up with Twitter to broadcast things to my friends.  A friend of mine got interested as well, and we started following each other.  Then, I started working for the same employer and soon coworkers found my profile through my friend.  I have always tried to keep some level of anonymity but when my real picture was plastered on my twitter profile, it was hard to hide the fact it was me.

4000 updates later on Twitter, I’ve realized I can’t just say what I want any more.  See this article about a consulting firm of FedEx became angered when someone they were paying to help them made defaming remarks of the shit hole city they’re based in.

So now, I’ve gone private on Twitter, removed a number of followers I don’t know, and have returned to using it as a communication tool with people close to me.  No more bitching at the free world, no more possibly embarassing myself.  It sucks it had to come to this, but I need to realize I’m representing more than just myself online.  Since I’m associated with my coworkers, I’m therefore a voice for my employer.

Getting Macs to play with Ubuntu

I’m a fan of Unix operating systems in general.  That’s what got me interested in switching to Mac OS X because it’s Unix-based.  It was inevitable that I would eventually get a server-class machine again that wasn’t Mac-based.  The new Dell machine that I have running has Ubuntu 8.10 – a Debian-based machine which is something I’m new too.

I wanted to set up the Ubuntu machine to share files with the Macs on my network but not by using the crappy Samba protocol or even NFS.  I know both are troublesome and not as speedy on a Mac.  My only other choice was to get AFP working on the Ubuntu server and to my delight, packages exist for this.  Netatalk is an Appletalk daemon and Avahi is a Bonjour zeroconf equivalent.  Installing those packages and starting the services didn’t do it for me.  Leopard was having issues with the cleartext passwords being passed to AFPD so I went nowhere.

I did some digging and realized that OpenSSL isn’t GNU and therefore support for it in netatalk isn’t compiled in.  Not being super familar with how Debian packaging works, I looked for a guide to help me with recompiling and installing the updated netatalk package.

I found it and boy it’s an awesome guide.

http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

Take a look, try it out.  It worked perfectly me for on Ubuntu Intrepid Ibex (8.10).

Top 25 Most Dangerous Programming Errors

The SANS Institute released a report on the top 25 most dangerous programming errors in the industry on January 12th, 2009.  Items such as SQL injection, Cross-Site-Scripting problems and input validation top the list.  The issue brought up isn’t necessarily the errors themselves but rather the education of programmers and software engineers to be aware of the problems and include testing to find them.  Most programmers coming out of college today aren’t specifically taught what is considered a bad programming error.  Becoming familiar with the list and learning more about the errors you don’t understand will make you a better and safer programmer.

http://www.sans.org/top25errors/

This isn’t a static list – it can and will be updated periodically over time.

An idea for a college course :: Unit Testing

After spending a significant amount of time this week on writing JUnit tests for a Spring Web app, I’ve come to a conclusion.  College courses, even in the grad classes I am taking don’t spend enough time on the concepts behind unit tests.  Granted JUnit and NUnit has been covered in the classes I’ve had but really only the testing framework is discussed.

Test-driven development (TDD) teaches us how to write a test first, make it fail, stub out your methods, and then code until your test passes.  The practicality of TDD in the real world is limited because a requirement is to have your system well designed up front.  Getting to a point where you’ll know method names ahead of time means you’ve spent a significant amount of time thinking about the design and analyzing that design. 

We all know that is rarely the case.

There needs to be a course on the concepts that we need to keep in mind when designing a system so it can be tested later.  What kind of concepts?  Understanding exactly what you shouldn’t do to make tests difficult – limited coupling and high cohesion.  I started to get a better idea of those concerns when I took a training course on the Spring Framework.  Spring lets you use plain old Java beans for most of your core controllers which lets you test the functionality of the controller and not have to test the framework.  Keeping those concepts in mind during your development will help out later.

In this last semester I took a software engineering course.  In one of the lessons, a simple rule came up that I felt was totally appropriate for this theoretical Unit Testing course.  Any methods you create should only take the exact type of arguments you’ll use in that method.  If the method calculates a pay increase for an employee, the method should take float for the current pay and a float for the percentage increase.  Creating a method signature with an Employee object and something like an AnnualReview object doesn’t define the method, it only confuses the developer.  How can you write a JUnit when you don’t know what the method is going to use?

So that’s enough of my rant for now.  I think I’ve written more in this post than I did for my final paper in the class.  Ha!

JUnit Testing

I’d like to point out that writing JUnit tests after the fact is a pain in the ass.  I like to think I know enough about software engineering to develop software that has high cohesion and limited coupling.  Not following test-driven development allows me to forget some of those simple rules and now writing EasyMocks is killing me.

Springs of a Different Color

So I spent most of the past few months learning the bleeding edge of the Spring Framework, 2.5.x.  The training I went to covered this version, the books I had covered the same.  My first assignment?  Using Spring 2.0 and Web Flow 1.  Talk about crushed.  Now I have to unlearn everything and go back to a previous version.  This happens a lot, from what I’ve seen.  Companies aren’t willing to upgrade because of fear of stuff breaking; but they’ll write shit loads of work-around code to keep old solutions working.  That eventually bites them in the ass when the product they’re on goes off support and they’re forced to do a huge conversion.

Fun stuff.

Domain-Driven Design

In my Thursday night graduate class, Enterprise Data Modeling, we’re working through Eric Evans’ book, Domain-Drive Design.  The book is taking us through the concept of designing an application based on the domain, or business use, rather than through UML and directly with objects.  So far, it’s pretty dry but the concepts are very clear and relative to my world.

I’m only on chapter 3 but already the concept of a ubiquitous language is a solidification of what I’ve tried to do since the beginning of my career with computers.  I’ve always known, maybe not so consciously, that business users and developers typically live on different levels.  In the past, I’ve been the one the users come to for help because I don’t throw up the typical IT wall in front of them.  This book explains why developers suck at obtaining requirements and why end users don’t give two shits about developers.  Developing a vocabulary and language that BOTH parties can speak about a domain is key.

I still don’t see how exactly it’s going to be accomplished without a lot of difficulty.  I’m assuming I’ll be more enlightened by the end of this class.  I’m hoping this blog can be more of a help with digesting this information.  We shall see.  More later.

My Blog, Revisited

I started this blog a while back but it was lost in the ether.  An upgrade of Rails and a few attempts at fixing it caused it to go poof.  Alas, I’m ready to start this blog again.

What is it for?  Well, a bunch of things.  I’m going to post anything here that I think is geeky.  This could include software development, gadgets, tips and tricks, whatever.  I have no idea of what is going to end up here but I have ideas often enough that never get recorded.

Page 30 of 30

Powered by WordPress & Theme by Anders Norén