Today I was playing with the robot and was thinking about a few possible ways of solving a particular problem I was having so that the internal API is nice for developers to attach to.
I wondered if a method from a base class could be used as an implementation of an interface, even though the base class does not implement explicitly that interface (but the inheriting class does).
I will admit to not fully understanding the little details of C#’s inheritance system, but I and the people I asked about this problem couldn’t give a definitive answer without trying it out.
This is the simplest code I could write that explains the concept of what I’m doing. ChildClass extends BaseClass and inherits Interface, but does not implement the testMethod method defined in Interface (however BaseClass does). For ChildClass2, the method is overridden. The output is what you would expect – ChildClass.testMethod() writes “BaseClass”, and ChildClass2.testMethod() writes “ChildClass2″.
Note it does not matter in this case whether BaseClass is abstract or not, nor does it matter whether testMethod in BaseClass is declared virtual or not (but you can’t use ChildClass2 if it’s not virtual of course).
using System;
namespace InheritanceTest
{
public interface Interface
{
void testMethod();
}
abstract public class BaseClass
{
public virtual void testMethod()
{
Console.WriteLine("BaseClass");
}
}
public class ChildClass : BaseClass, Interface { }
public class ChildClass2 : BaseClass, Interface
{
public override void testMethod()
{
Console.WriteLine("ChildClass2");
}
}
class Program
{
static void Main(string[] args)
{
Interface cc = new ChildClass();
cc.testMethod();
Interface cc2 = new ChildClass2();
cc2.testMethod();
}
}
}
I just “deactivated” my Facebook account. Note they don’t call it deletion – that would imply your data is actually gone – but at least it’s better than nothing.
I’m fed up of their repeated screwups with privacy. Their apparent complete lack of regard for what anyone cares to be done with their data (I guess that’s easy to do when you’re making a lot of money out of it).
I only every used it for putting some photos on contacts on my phone, I’m not going to miss that particularly. In Android 4 you couldn’t do that anyway, as Google blocked it.
The new Timeline thing was the final straw for me. Thanks, I really wanted to dredge up those status updates from 2007 with no way to delete them. 2012 me is not even close to 2007 me (I probably wouldn’t recognise 2007 me in the street) and I don’t really want to be reminded of that.
I guess it comes down to the fact that I really just don’t give a crap about any of the information or benefits Facebook could offer me.
If I ever make some statement about thinking about joining / applying to Google, please remind me of this post so that I come to my senses.
Follows is a non-exhaustive enumeration of the reasons I do not wish to work at Google.
1) I will not sign a contract that prohibits me from telling my significant other what I did at work today. I can promise you she is not a Bing spy, and wouldn’t even know what I’m on about if I said the code I had been working on had provided a 3x speed boost for users of a certain API. There’s something wrong with being contractually obliged to hold secrets from your other half.
1a) Same as 1) but for mum.
2) I will not have “sweetners” used to offset wages, which may subsequently be removed. See here for more.
3) You can slap as much lipstick on the pig as you like, but Google is still a large company and will still feel, look and act like one. No thanks.
4) I’d like transferable skills. Sure there’s learning programming languages and people skills etc., but I can learn those elsewhere. Learning behemoth internal APIs and writing apps that will only ever run on one architecture (Google’s massive one)? What’s the point in learning about scaling if you can only scale on one architecture? Hardly transferable.
5) I do not want to be bombarded by questions I cannot answer. Not that I do not know the answer, but I am not allowed to give you the answer. I.e. any conversation I have with anyone who asks “So what do you do?” is limited to “Work for Google” and “I write software”. Booooorrrrring. Additionally, because I work for Google, everyone spends the whole time trying to extract information out of me in increasingly stupid ways. Also boring.
6) I don’t need the CV boost it could give. (I deleted my CV anyway)
7) I fundamentally disagree with their hiring process. Specifically, the bit where they pull some names of algorithms out of a hat and ask you to state their time complexity. This will be controversial, because Google engineers say “But this is the simple stuff”. It is a waste of my time to remember this – I am sat at a computer, and if I really need to know it then I can look it up quite easily. What matters is that I can analyse algorithms in code for their time complexity, and suggest optimisations; properly assign problems to suitable data structures and pick algorithms for specific cases optimally; and understand common formats for expressing algorithms in pseudocode so that they can be easily implemented if necessary. I see memorising this lot just for one interview as counterproductive and an inefficient use of time. Unfortunately for Google, this is the first pre-screen on their phone interviews, so it never goes that well.
Following near disaster over Christmas, I have resolved a hardware issue with the robot and got some impressive performance from it.
The robot uses a Kinect sensor for establishing its 3D environment. However e Kinect is designed to run eier off an Xbox 360 (the new one) power boosted USB variant, or off mains – neigh of these are good options for a mobile robot.
Howev thanks to some useful blog posts and a couple of email exchanges with various robotics colleagues around the world, it became apparent that cordless power drill batteries are ideal for driving the Kinect for sustained periods.
I have a Bosch 14v drill battery, which I stripped to its bare innards so it can fit inside the rather compact chassis. Over Christmas this system stopped working and I had to run the Kinect from mains, which is a non-ideal solution while trying out various algorithms of motion.
Today I had a check of the cables, charged the battery and checked the switches and it seems everything is back to normal and fully working. I was even able to get an astonishing 93 minutes of full-on Kinect use out of the not-quite-full charge, surpassing my own ambitious predictions by over 50%!
I will post full details of the Kinect setup for batteries at some point as I think others may fund it useful. It is also extremely cost-effective.
I was given the Jobs biography for Christmas, and while I made a start a couple of weeks ago, I haven’t really progressed beyond the first couple of chapters.
This is for a number of reasons, which are mostly not anybody’s fault.
It’s not actually the content that’s doing it. Overall it’s written pretty well and stories are told well. There have been a few bits I haven’t liked so far, but that’s not really something to complain about.
By far the biggest issue with the book is that it is a book. As in, made out of dead trees. I have the hardback and it weighs an absolute TON. It is almost impossible to read in bed it is so large. There are no highlighting capabilities (discounting vandalism) and I can’t read it in the office as well as at home without having to carry it around (which is, incidentally, entirely impractical). I can’t search it (other than page by page) and there’s no built in dictionary functionality.
This all may sound like a joke but I assure you, I have come across each of these issues in the short amount of time I have been reading the book. Quite spoilt by the Kindle, no doubt.
Thinking of books, I was sat in a lecture today and was recommended a hefty tome on Cybernetics for subject background. Now, at the end of my degree, having bought a grand total of 3 books for the entire 4.5 years so far (one of which I would be quite happy to burn, those of you in the department may know it as Software Engineering) I somehow feel compelled to start collecting these books to form some kind of small library to help me remember bits of my degree when I inevitably start work in a completely unrelated field and build robots for fun in the evenings (Robotics has always been a hobby more than a career for me). Perhaps I will buy one with my first pay packet.
- Categories
- Archives
- RSS
- Android
- Apple
- Azure
- Cars
- China
- Chrome
- Communication
- Development
- Events
- Favorit
- Films
- Formula 1
- Hardware
- Huddle
- Imagine Cup
- iPad
- iPhone
- Life
- Linux
- LOL
- Mac
- Microsoft
- Mobile
- Music
- News
- Nexus One
- Photography
- Physics
- Projects
- Review
- Robots
- Social Media
- Software
- Space
- Surface
- Sysadmin
- The Blog
- The Web
- University
- Video
- Windows 7
- Windows Phone 7
- Wobots
Android Apple ARNIE C# Cairo Chrome Development E-Mail Event Facebook Fail Google Google Chrome Hardware Huddle Imagine Cup Imagine Cup 2010 Imagine Cup Poland iPad iPhone Microsoft Mobile MSP NASA Nexus One Nokia Office Office 2007 Phone PHP Presentation Project365 Review Robots Software Student Tweetmeme Twitter University University Of Reading Video Windows Windows 7 Windows Phone Windows Phone 7
- January 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- January 2009
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007






