It’s not you, it’s them

I believe in asking for help, for being vulnerable about the things we don't know, especially if we've been in industry a long time. We can't possibly know it all, and it's important to normalise that.

So I wrote a blog post about the thing I was struggling with. Yes, it also had the lovely positive of asking The Internet to solve my problem.

Shocked I was, shocked (no, I was not) to receive responses suggesting that perhaps I was a bit rubbish as a developer.

Continue reading "It’s not you, it’s them"

“Simple” Network Connections with Java – a problem

I've been playing with NIO for network stuff to see if/how I want to update the code for Head First Java 3rd Edition. The original code used Sockets and Readers/Writers, and I thought there must be a more "modern" way to do this so I've tried updating it a few different ways. I got it working using SocketChannel and ByteBuffer (eventually!), but the ByteBuffer stuff is just too fiddly to use to teach people basic network IO in Java. After turning to Twitter for the answers (Twitter Driven Development) I had what looked like a promising hybrid approach.

However, I've run into a problem with using the Channels factory methods to provide this nice bridge between NIO (SocketChannels) and classic streaming IO.

I'm posting the code here because you can't post source code this long on Twitter! Maybe someone can help me.

Continue reading "“Simple” Network Connections with Java – a problem"