Php syntax (semantics) exam

I just finished the PHP Syntax Exam at http://www.blueshoes.org/en/developer/syntax_exam/ in 555 seconds and had 24 errors in 69 questions.

Do you think you can beat me? 🙂

Wow, whoever wrote this “exam” doesn’t even know the different between syntax and semantics. Syntax was not tested at all. Semantics was tested.

Honestly, I’m surprised I did as well as I did, given the horrible abomination of a language that is php.

At Microsoft Kickoff

Wow,

I have no idea how or why DETROIT is the #2 stop on the Microsoft Visual Studio 2005 Lauch tour. Maybe they think that after their big launch in San Fran, they need a list of crappy cities to work the kinks out of their tour. Don’t get me wrong, I love Detroit, I just didn’t think anyone else did.

Team System is the most integrated application I have ever seen. You can do everything from where it makes sense. Project managers can manage projects in Excel and still be working off the team server. It is really awesome. Of course, the pricetag is so insane I really don’t think very many organizations will adopt it.

The stuff about Team Foundation Server (or whatever the VSS replacement is) about concurrent versioning made me laugh. The presenter actually demoed an example of merge and I kept thinking, wow, I had this 10 years ago when I first used source control. It was called CVS.

So far I have seen a keynote and a Team System presentation. I’m looking forward to afternoon presentations about more products which I will probably never use.

Program Wish list… or things that would just be cool

  1. Mono minimize swap out.
    Check out a 1.1 .net windows form app. Look at its mem usage in taskman. Then minimize it. Notice how the memory usage changes entirely. It would be sweet if mono did this.
  2. ipodder loses it memory.
    Yes it looses its mind. Well, ok it looses its preferences, it would be nice to squash this bug.
  3. Openmoveover
    is only free for linux. It would be nice if the windows part was free too
  4. smarttags are cool
    It would be awesome if gvim, gedit, abieword, kword, everything… in linux used a unified smart tag engine. Fuck MS patent.
  5. A port forward manager/maintainer
    for windows and unix would be SWEET. It could detect your IP and do special things if you are in a special location.
  6. A todo list API like blogger.
    tood list manager for tomboy
    & really all of tomboy as desktop and web accessible.
  7. Axinom – axcms some kind of CMS for mono would be sweet.
  8. A password vault website and long password generator
  9. unified tinyurl + delicious + bloglines/technorati
    so that the shrunk url shows who is blogging that url, other things people have marked on delicious for the 2 seconds before the redirect.
  10. Sending info(files) securely(https) with a delay holding cell(timer) and a password to get to a file, and wiki for notes for the file?
  11. Windows port redirect – std alone and service.
    When firewalls get in the way sometimes a nice port redirector can come in handy. This is really a proxy without the proxy protocol, the data through a socket would just get sent some place. Windows may allow redir in kernel land or its tcp/ip stuff rather than in userspace.

Naturemill Home Composter

I typically don’t like metablogging (I’ll stop blogging about blogging now).

I found this on Signal vs. Noise and it immediately made me think of Matt Rose.

Naturemill Home Composter

By Jason on Customer experience

This looks like an incredible product – indoor composting with no odors and no mess. You can even compost meat and fish. Simple too – one button operation. A red light comes on when the compost is ready. It’s small enough for 1 person living alone or big enough for a family of 5. Here’s a friendly interview with the Ross Cohn, the president of the company. I love his tone, honesty, humility, and the way he talks about his product. Some good insight into the design of the product and recent improvements they’ve made based on customer feedback.

Some highlights:
Another “must have” feature we added is a food pedal to open the lid – I guess our engineers don’t do enough cooking to realize that there are never enough hands in the kitchen.
One feature I really like is that you don’t have to keep adding compost cultures, or any other feed material, as with most compost systems. The machine retains a small amount of finished compost after each load, so in a way it replenishes itself with hot, fresh compost cultures. This saves a lot of money in the long term, and is very convenient too.
The new control panel has just one button. How easy is that! There isn’t even a clock to set. I’m really tired of having to “operate” all the other devices around my house, with all these beeps and dials. This is much easier. We’ve put a lot of intelligence into the software, so you can focus on gardening and cooking instead of managing your compost pile.
It’s really quite fascinating to observe composting being made, and yet not have to do any work yourself. To me it’s a little like watching an ice cream machine. Except you really don’t want to eat this stuff.

If you have the means (and the place to put/use the compost) do the Earth a favor and pick one of these up.

Clarifying things I wrote in the previous post.

Eric IMed me and said he couldn’t post.

Thanks for the heads up on the ssh connection sharing, I’ll definitely be checking that out.

I can’t tell if you’re implying that interfaces are somehow the same as base classes, but they definitely are not. They’re not the same as abstract base classes either.

On semi-related notes, you should check out the “open closed” principle of OO design, if you haven’t already, and the “fragile base class” problem. It sounds like you’ve hit on half of the issues those two topics cover, so they might seem like covering ground you’ve already been over, but you might find a tidbit or two that you find interesting.

I meant to say that C++ doesn’t have “interfaces” although there is nothing preventing one from making an abstract base class and using it as interface, in fact that was/is the C++ way. That is all I meant. Which is why I mentioned COM/MIDL because MIDL was created exactly to define an interface in a language which doesn’t explicitly have interfaces. I fondly remember writing MIDL for my COM interfaces, but I prefer a language which allows me to express this though the use of an interface in the language, like C# or Java (or VB.net or any of the .net languages).

I liked looking up both open-closed and fragile base problems. The open-closed thing is easy to handle IMO. I’d like to think the things which I’ve written handle it well enough. The fragile base problem I can’t say I entirely agree with. I understand the problem, but I can’t say that interface instead of implementation inheritence is the best solution. That is what VB6 and COM had, and believe me, there are many of us who really missed the implementation inheritance.

That said, I’ve usually found myself defining interfaces, implementing an abstract class, and then inheriting some implementation from the abstract class. I prefer the lazy programmers approach here. Don’t require programmers(or yourself) to reimplment things simply because you are afraid of what they may do wrong if they implement or override a function incorrectly. I argue that you can’t really solve this much more even with interfaces (short of sealing classes). Of course I’ll have to admit that my experience in this regard is limited. My approach is to define the interface, and then implement it as an abstract class. This abstract class does all the things which I expect all inheritors of the interface to do and it does any helpful nice things that I may expect implementors to need. That is it. Am I missing some piece of the fragile base class puzzle?

SSH Connection Sharing, C++ Visibility, Share Libraries, and GCC Attributes. OH MY!

Whew, what an evening. It started off simple enough. After dinner I just sat down and my good friend and co-worker Chris IMed me about something or another. We were making small talk until I remembered I wanted to share with him the new SSH Connection Sharing support introduced in OpenSSH 4.0. What is it?

From the ssh_config man page, the “ControlMaster” option “Enables the sharing of multiple sessions over a single network connection.” I configured it on my system simply enough. I added an entry to my ~/.ssh/config file for each host which I connect to often enough to warrant using this feature. In my case, that is only one host. I added this the aforementioned file:


Host little.xmtp.net
ControlPath /tmp/ssh_little_jrwren

Now I can start a ControlMaster by invoking ssh -M. I can keep it around forever (or until killed) by invoking ssh -MNf. Now each time I ssh to little.xmtp.net, there is no delay. There is no TCP/IP session to open up, there is no key exchange, there is no SSH negotiation, all that is already done and waiting. I immediately get my remote bash prompt! Totally awesome feature.

Unfortunately this feature hasn’t been marketed very well. The number 1 google result for “controlmaster controlpath” (the two options for this feature) returns this GCCWiki page suggesting its use with source control systems. It occurs to me its use would be extremely benefitial with distcc when using ssh as the rsh for distcc. Anyway, I thought I’d check out the GCCWiki some, so from the Home Page, the first thing I decided to click was the Proper C++ visibility support link under the What is new in GCC 4.0 link. VERY awesome optimizations, but it isn’t what blew my mind.

This thing linked an excellent paper by Ulrich Drepper on good DSO design called How to Write Shared Libraries. This paper is great because it details just how programs use shared libraries and how the old a.out system works and ELF as well. It covers what various linker flags do, what some environment variables do to the dynamic linker, dlopen options, and probably everything (or in my case more than everything) one may wish to know. But this is still not what blew my mind.

My C skills aren’t that great. I can get by, but I’m no expert. My C++ is even worse, mostly because I haven’t used it since college and even then it was only 3 semesters, two of which were 10 years ago. I am however becoming an expert enough at C#. I like to think I have pretty good understanding of what is going on with C#, but one feature which I’ve definitely not mastered and never had need to utilize is that of Attributes. What blew my mind was that GCC has extentions for function attributes, very similar to C# attributes. OK OK C# attributes are WAY more extensible, but the concepts are similar.

One of the things I didn’t understand immediately when I started doing OOP using C++ ten years ago was the use of private members (variables or functions). I did understand what meant, what to expose, OK, I guess I understood it, but my general attibute was to just keep everything open (public). If someone wanted to use one of my members, let them. Give freedom and flexibility to someone using a class which I had written. Of course after some time I grew to appreciate following interfaces (base classes, this is c++ right? how about MIDL defined COM interfaces?) and not extending them unless necessary. I changed my tune slowly once I saw the value in it, but reading this DSO paper was extremely enlightening.(mind blowing?)

The function attributes page and the Shared Library Howto describe the visibility attribute. What I find interesting is that C++ private members should all be able to get visibility(“internal”) attributes. That is more interesting to me regarding shared library usage and C++ member protection levels. I’m sure it is nothing I will ever use, at least not in the near future, but it is definitely something new to me. I like new things. I like thinking about new things. I definitely like new light shed on old things, especially when they make me think about things which I wouldn’t otherwise.

Now it is late and I’m only 1/4 of the way through that Shared Library paper. I don’t think I can finish it, I’m too tired. That will probably be my epitaph “always too tired to finish things.”

Looking for good dotnet programmers

The company for whom I work is looking to hire a good dot net programmer. If you would like to work in the Ann Arbor area and are good at dotnet programmer, please email me.

Specifically we are developing Web Services, and Sharepoint webparts, and some Windows Services. Sorry, no windows forms or mobile development here.