AbstractPath | AbstractPath http://www.abstractpath.com thoughts from @tumtumtum Sun, 26 May 2013 14:43:25 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 Tips for running a tech startup http://www.abstractpath.com/2013/tips-for-running-a-running-a-tech-startup/?utm_source=rss&utm_medium=rss&utm_campaign=tips-for-running-a-running-a-tech-startup http://www.abstractpath.com/2013/tips-for-running-a-running-a-tech-startup/#comments Sat, 18 May 2013 21:39:24 +0000 tum http://www.abstractpath.com/?p=824
  • Do not forget that your most important task is to focus on creating a great product. No amount of marketing spend will make up for a crap product that no one really wants to use. 
  • Make what you know — not what you think will make money. Running focus groups to “discover what is needed” is something best left to large corporations with money to burn and little or no vision or decision making capabilities remaining. Your chances of success  are greatly increased if you create your startup to answer a need that you yourself have. In doing this this, you will not have to constantly ask if what you are doing is right. You also guarantee that you will have at least one user: yourself.
  • Choose one or two things you want to do really well and then set out to do them really well. Do not allow yourself or those who work for you to lose to lose identity and focus. Do not create a homer.
  • Do not forget to create a strong company culture.  Do not expect it to create it itself — especially if you are the founyder. Think about what your company’s goals are and then think about the people you will require to accomplish those goals. For example, if your product is a software product then do not deny that you are a technology company. If you’re a technology company then create a culture that will attract technology people. Engineers like casual dress, free coffee, free soda, free snacks, fast computers, big monitors, comfy chairs and a quiet working environment. Providing these things will be one of your most cost effective spends and your investors will thank you for it.
  • Do not forget to create a strong brand. The brand projects your company’s culture and values. Like your company culture, the brand will not create itself. The brand needs to be lucid and unified. Don’t forget that the brand is for everyone; most especially your employees. A strong brand will reduce conflict in decision making. (Think of the question: “Is this constitutional?”).
  • Do not focus on small problems whilst ignoring the large problems. For example, do not stress over the cost of a coffee machine for your developers whilst ignoring overrunning third-party consultancy costs (such as SEO consultants).
  • Do not hire SEO consultants.
  • Do not outsource your core competency. If you’re a game company, you can outsource your web design but don’t outsource your game design and development!
  • Avoid anyone who regularly uses the terms viral or game changing as if it’s a solution.
  • Avoid anyone who thinks that the key to success is the silver bullet of the week (for example: changing the color of your buy button from grey to blue is not creative thinking nor will it magically double your user count).
  • Look for the best engineers and pay them accordingly. Simple.
  • Except for sensitive financial information, do not create a cloak and dagger culture. If you’re a tech startup, your employees will (if you’re doing your job properly) be above average intelligence. Respect that.
  • If you’re an engineer yourself, you probably can’t wait to get your hands dirty in the code.  Encourage rather than discourage your team to code. Managers at Google and Facebook are encouraged to code. Software engineers like to follow managers who can code just like soldiers like following orders of generals who can fire a gun.
  • Software scales very well economically. Do not skimp on the initial development costs. Invest upfront to create a great product because the cost of distributing a great product to 10 million users is going to cost about the same as distributing it to 10 users. If you don’t create a great product, you won’t have 10 million users. Someone else will.
  • In the physical world, a premium product has to have a premium price tag to cover the costs of materials and production. In the software world, a premium product does NOT necessarily have to have a premium price tag. If you try to compete purely on price (rather than on quality or execution) then someone else will get your users.
  • Limit your product functionality for up-sell if required but don’t think that deliberately creating a poor user experience in the hopes that people will upgrade is a good strategy. What is most likely to happen is that the user will not pay at all and use an competing product instead. A good example is coffee shops. I once heard it argued that coffee shops should have uncomfortable chairs to encourage faster throughput of paying customers. This sounds reasonable but it does not take into account competition. You may be able to get away with this if you are the only coffee shop in town but in reality your customers will quickly find better, more comfortable places to drink and socialise. You may get customers once but they won’t come back. People don’t put up with bad user experiences unless they have to. If you’re building software, think about creating the equivalent of comfy chairs for your users. As mentioned in the previous point, the amortised cost is minimal.
  • Have fun :-)
  • ]]>
    http://www.abstractpath.com/2013/tips-for-running-a-running-a-tech-startup/feed/ 0
    Platform.VirtualFileSystem http://www.abstractpath.com/2013/platform-virtualfilesystem/?utm_source=rss&utm_medium=rss&utm_campaign=platform-virtualfilesystem http://www.abstractpath.com/2013/platform-virtualfilesystem/#comments Fri, 03 May 2013 17:17:21 +0000 tum http://www.abstractpath.com/?p=802 I’ve just open sourced my Virtual File System library for C#. It provides a uniform interface to any type of file system providing interfaces for navigating, reading, writing, hashing and network access. It’s useful on both client and server side. The best feature is support for creating (sub)views of file systems — similar to chroot on unix. You should never try to access file systems directly again.

    You read more about it from the GitHub project page :-)

    ]]>
    http://www.abstractpath.com/2013/platform-virtualfilesystem/feed/ 0
    The ridiculousness of Microsoft .NET JSON dates http://www.abstractpath.com/2013/the-ridiculousness-of-microsoft-net-json-dates/?utm_source=rss&utm_medium=rss&utm_campaign=the-ridiculousness-of-microsoft-net-json-dates http://www.abstractpath.com/2013/the-ridiculousness-of-microsoft-net-json-dates/#comments Tue, 30 Apr 2013 15:49:16 +0000 tum http://www.abstractpath.com/?p=789 If you’ve seen JSON date times as formatted by WCF you’ll notice that they’re formatted like this:

    /Date(700000+0500)/

     
    The first number represents the number of seconds 1/1/1970. The second number represents the time offset from UTC (presumably from the location where the date was created).  I’ve seen a whole lot of confusion on the internet about what to do with the second number on deserialization. Many people try to adjust the time they got from the first number with the second number. Do not do this. The reason the second part exists is ridiculous and relates to a change Microsoft made to .NET between version 1.0 and 2.0.

    When Microsoft released .NET 2.0, they introduced a new property DateTime.Kind which affects the behaviour of the ToUniversalTime and ToLocalTime methods. If you have a DateTime representing a kind of “Local” then converting ToUniversalTime would return a DateTime with a different value however if the kind of the DateTime was already Utc then calling ToUniversalTime would return a DateTime with the same value. Presumably the Kind property could be queried by UI controls in order to determine whether conversion is necessary before display.  I would argue that internally you should always store DateTime as UTC and then always convert to Local (or whatever timezone you need) on display. There is a highly questionable performance advantage to internally storing dates as local time.

    The only information you need to reconstruct a valid time is the first number. The Microsoft JSON deserializer will ignore the + or – as well as the second number and only uses their presence to indicate the DateTime.Kind of the deserialized DateTime structure. This Kind will only affect whether the internal value of the DateTime is stored relative to 1/1/1970 local time or 1/1/1970 UTC but will not affect the actual time stored. If you were to call ToUniversalTime on the deserialized DateTime it should come out to the same value regardless of whether the second number was +0500 or -0700.

    Generally it’s good practise to convert a DateTime ToLocalTime before displaying to the user so the need to set DateTime.Kind is completely unnecessary and confuses the serialisation format. This confusing method of serialising DateTimes may have performance advantages in very edge case systems. In my opinion, most well designed systems would only ever work with DateTimes in UTC format, converting only at the time of display.

    ]]>
    http://www.abstractpath.com/2013/the-ridiculousness-of-microsoft-net-json-dates/feed/ 1
    London startup tips from a tech guy http://www.abstractpath.com/2013/london-startup-tips-from-a-tech-guy/?utm_source=rss&utm_medium=rss&utm_campaign=london-startup-tips-from-a-tech-guy http://www.abstractpath.com/2013/london-startup-tips-from-a-tech-guy/#comments Fri, 29 Mar 2013 19:12:14 +0000 tum http://www.abstractpath.com/?p=756 Here’s some startup tips from a tech guy who’s been working in a London startup for the last few years.

    • Start your company with like-minded people who share your vision.
    • When hiring, intelligence and experience are both important but intelligence is more important.
    • It’s hard to not stress this enough. The best marketing is a great product. Pushing pixels and marketing gimmicks will only get you so far.
    • Creating and marketing a new brand is very different from maintaining and marketing an established brand. Someone who’s able to sell ads for Sports Illustrated or cigarettes for Rothmans may have marketing skills applicable to a startup but it’s hard to know because the brand sells itself. It’s quite possible that they don’t have marketing skills at all.
    • A good idea is important. Very important. But it is only 1% of what’s important. The other 99% is execution.
    • Do not be afraid to go back to the drawing board. Bad product ideas can’t always be patched up.
    • A technology startup should be staffed by people who love technology at all levels, not just engineering.
    • Attract creative people. Flexible hours, casual dress, natural light, plants, artwork, fresh fruit are all relatively inexpensive.
    • If you’re an engineer, don’t let people tell you to stop coding. There’s a reason why companies like Google insist that their technical managers spend at least 20% of their time coding. For engineers, coding is our own form of meditation.  You’ll be a more effective manager because engineers prefer to be led from the front.
    • Admit you’re wrong when you’re wrong so you can move on and be right. Gently help others to do the same.
    • You will encounter a lot of bullshit artists a long the way.  SEO specialists and management consultants are a complete distraction.  What they peddle is mostly common sense and what they charge for it is insane. Put your money and resources into product development.
    • You may need to work with people who don’t know what they’re doing. Manage them if possible but don’t waste your time doing anything you don’t believe in or anything for anyone you don’t believe in. Life’s too short and you’re never trapped.
    • Don’t outsource your engineering projects; even to other London agencies. Keep everything “in the family” because you’ll get much better results. Bad code can be much worse than no code.
    • Do not ignore the fact that the most successful technology companies are started and run by engineers.  Engineers understand the importance of the product. Do not let investors or management sideline your engineers. Successful startups aren’t the ones that ignore their most important human capital.
    • Do not let people who don’t love or understand technology try to tell you you’re wrong about technology.  These people are known as bozos. Follow your gut.
    • Do not let people tell you you’re wrong simply because you’re younger. They could be right but they could also be very very wrong. Age should not be a factor. Again, follow your gut.
    • It’s better to miss out on hiring good people than to hire bad people. One bad apple in your team can totally ruin it. Skills must go hand-in-hand with humility.  Having one but not the other is not good enough.
    • Your science training is gold. Scientific thinking and methodology can and should be applied to product, design and management. It’s amazing how many business people don’t actually think.
    • The best products are created by people with the need themselves. It’s incredible difficult to create a great product from scratch if you don’t have the need yourself.  Focus groups etc are unnecessary when you know what you want.  Often focus groups are used by people too afraid to make their own decisions and/or people who manipulate the results to further their own personal agendas. These people are also known as bozos.
    • Focus on doing a few things and a few things well.  If you’re developing something you need yourself you will know what the most important features will be.
    • Much of your time may be spent protecting your designers and developers from reactionary feature creep. This is an important responsibility, a fact of life, and must not be ignored.
    • Be a perfectionist in everything you do but remember that you will need to ship. This means you’ll need to compromise on features. It’s better to have 5 features that are perfect than 20 that are below average.
    • Make extensive use continuous integration (I have a soft spot for TeamCity). Compiling, testing and deploying should all be one click.  Stop everything you’re doing and spend an entire day setting this up if you need to.  You’ll be thanking yourself every day after.
    • Make decision quickly and then re-make them if necessary.  Indecision (especially if it comes from the top) is very bad for productivity and morale.
    • Find people who can earn your trust and then trust them. These may be business people, investors, designers and engineers. Don’t waste time with people you can’t trust.
    • Work with other companies. Google & Facebook are two large tech companies with a significant presence in London and they both love working with startups.
    ]]>
    http://www.abstractpath.com/2013/london-startup-tips-from-a-tech-guy/feed/ 0
    IIS Output Caching and Accept Header http://www.abstractpath.com/2013/iis-output-caching-and-accept-header/?utm_source=rss&utm_medium=rss&utm_campaign=iis-output-caching-and-accept-header http://www.abstractpath.com/2013/iis-output-caching-and-accept-header/#comments Sat, 02 Mar 2013 19:13:53 +0000 tum http://www.abstractpath.com/?p=752 After a bit of testing I found out today that IIS Output Caching will not work unless the Accept request header includes */*;  Most browsers include this by default but if you make HTTP calls yourself (for example, using CFNetwork from iOS), you’ll need to include it.  For example:

     Accept: application/json,*/*;

    ]]>
    http://www.abstractpath.com/2013/iis-output-caching-and-accept-header/feed/ 0
    A simple pattern for cancelling GCD blocks http://www.abstractpath.com/2013/a-simple-pattern-for-cancelling-gcd-blocks/?utm_source=rss&utm_medium=rss&utm_campaign=a-simple-pattern-for-cancelling-gcd-blocks http://www.abstractpath.com/2013/a-simple-pattern-for-cancelling-gcd-blocks/#comments Fri, 08 Feb 2013 12:31:11 +0000 tum http://www.abstractpath.com/?p=747 Sometimes when using GCD, it’s useful to cancel a block that’s already been placed on a queue to be processed. You could have a field named “isCancelled” that the block can check for but if you have lots of blocks you’d have to have a field for each block (or a dictionary etc). It’s useful to just define the flag as a captured variable so that each block gets its own unique flag. Changing the cancel flag is done by providing the flag value as an argument to the block.

    @interface FooClass()
    {
    void(^block)(BOOL);
    }
    @end

    @implementation FooClass

    -(void) foo
    {
       BOOL isCancelled = NO;

       block = (BOOL cancel)
       {
           if (cancel || isCancelled)
           {
               isCancelled = YES;

               return;
           }
           
           doProcessing();
       }
    }

    @end
    ]]>
    http://www.abstractpath.com/2013/a-simple-pattern-for-cancelling-gcd-blocks/feed/ 0
    Mounting Linux software raid using a consistent device name http://www.abstractpath.com/2013/mounting-linux-software-raid-with-a-consistent-device-name/?utm_source=rss&utm_medium=rss&utm_campaign=mounting-linux-software-raid-with-a-consistent-device-name http://www.abstractpath.com/2013/mounting-linux-software-raid-with-a-consistent-device-name/#comments Thu, 07 Feb 2013 14:59:00 +0000 tum http://www.abstractpath.com/?p=722 It’s recommended these days to use the UUID of a mdadm based raid partition in your fstab.  This is fine for a single server but if you have dozens of identical servers, it’s a pain to have to maintain different fstabs for each server.

    Ideally you want your fstab to contain something like

    /dev/md/data     /data    ext3    defaults 0 2


    Rather than this:

    UUID=550e8400-e29b-41d4-a716-446655440000     /data    ext3    defaults 0 2


    The trick here is to set a name and a homehost for your mdadm array (you will need version 1.2 RAID metadata). The RAID array will still use the UUID to identify members of the array and the array will still be mounted as /dev/mdXXX however a link to this mount point will be made under /dev/md/ and it will be named the same as the name of the array.  If you don’t explicitly set the array’s homehost to “<none>” then the host name of the server setting the array name will be preprended to the name of the array which defeats the point of what we’re trying to do (identical fstabs across multiple servers).

    You can set a name for the RAID array by stopping it and them reassembling is as follows:

    mdadm --stop /dev/mdXXX
    mdadm --assemble /dev/md0 /dev/sd[a-z] --update=name --name=data --homehost="<none>"

    Replace /dev/sd[a-z] with the appropriate disks or partitions that make up your array.

    The last thing you need to do is change your mdadm.conf HOMEHOST setting to <ignore>. If you do not change this then mdadm on boot will mount your array as /dev/md/name_0 because the homehost of the array is empty and does not match the name of the mounting server. By adding this option, the integer suffix will only be appended if there are multiple arrays on the system with the same name.

    # /etc/mdadm/madm.conf
    HOMEHOST <ignore>

    Make sure you run update-initramfs after you change mdadm.conf.

    ]]>
    http://www.abstractpath.com/2013/mounting-linux-software-raid-with-a-consistent-device-name/feed/ 0
    Renumbering GPT partitions in Linux http://www.abstractpath.com/2013/renumbering-gpt-partitions-in-linux/?utm_source=rss&utm_medium=rss&utm_campaign=renumbering-gpt-partitions-in-linux http://www.abstractpath.com/2013/renumbering-gpt-partitions-in-linux/#comments Sun, 27 Jan 2013 16:52:38 +0000 tum http://www.abstractpath.com/?p=716 Parted doesn’t provide an easy way to renumber your partitions after you delete one and fdisk doesn’t support GPT. Fortunately gdisk can do this relatively easily:

    sudo gdisk /dev/sdc
    p (print/show)
    s (sort)
    p (print/show)
    w (write)
    q (quit)

     

    ]]>
    http://www.abstractpath.com/2013/renumbering-gpt-partitions-in-linux/feed/ 0
    Bloom.fm http://www.abstractpath.com/2013/bloom-fm/?utm_source=rss&utm_medium=rss&utm_campaign=bloom-fm http://www.abstractpath.com/2013/bloom-fm/#comments Tue, 08 Jan 2013 21:58:07 +0000 tum http://www.abstractpath.com/?p=679 Finally Bloom.fm is on the app store and officially launched.  For the last 15 months I’ve been leading a team of designers and programmers to develop this app.  I was given full control of the product which is fortunate because I really wanted to make a music app that I would use myself everyday. The principles I tried to embody inside Bloom are: Focus, Design, Usability, Performance.  As anyone who’s been in startups will tell you, it’s surprisingly hard to follow through on these principles when so many stakeholders want a piece of the action but I think the team has managed to do it.

    After 14 months of iOS/Objective-C development, I’m now going to focus mostly on the Android app. It’s been 7 years since I’ve done full time Java development so this will be an interesting change :-) . Over the last 4 years I’ve been a full time C++/QT developer, HTML/CSS developer, C# developer, Objective-C/iOS and now Java/Android developer.  It’s all over the place but somewhat exciting to mix up the work load with technical challenges of different flavours.

    You may here a lot about Bloom.fm being founded by the same people as the short lived mflow.  In a way it’s true, it’s the same company and same investors but just to be clear: mflow was the brain child of some non-techie marketing types (led by a committee) allowed to run amok. Bloom.fm is the brain child of techie-designer-music types (led by myself) allowed to run amok.  Time will tell which approach is more successful :-)

    Why Bloom.fm?

    With an almost zero-cost for Internet distribution, it makes sense for the music industry to encourage growth  of legal music consumption rather than increase (or maintain) prices to ward off loses from rampant piracy.  At Bloom.fm we use two strategies for encouraging growth.

    The first is that we bet on the mobile computing revolution and have focused on creating the most usable music app for smartphones.  For many, a la carte shops are too expensive an option and streaming music apps are still too complicated and don’t give the “joy” that you may get from using other types of apps.  By designing an app from the ground up with mobile in mind we hope to capture a large chunk of users who haven’t fully gone digital yet.

    The second is that we negotiated lower pricing.  For many people (especially students), £10 a month is too high whilst they’re studying but if we offer them a service that makes sense and at a fair price we hope that they will see the benefit of paying for music when they graduate and are in a position to pay for the premium subscription levels.

    We don’t see streaming services cannibalising traditional music sales; we see music services complementing and growing the addressable market.

     

     

    ]]>
    http://www.abstractpath.com/2013/bloom-fm/feed/ 0
    Discovered my old P++ compiler http://www.abstractpath.com/2013/discovered-my-old-p-compiler/?utm_source=rss&utm_medium=rss&utm_campaign=discovered-my-old-p-compiler http://www.abstractpath.com/2013/discovered-my-old-p-compiler/#comments Tue, 08 Jan 2013 03:22:08 +0000 tum http://www.abstractpath.com/?p=674 P++ is a language based on PL/0 but borrows heavily from C, Haskell and other languages.

    I wrote the compiler and interpreter for P++ at University back in 2000 as part of my second year programming languages paper. It was only supposed to be a 200 line assignment but I enjoyed learning about compilers so much that I added many advanced (advanced compared to PL/0) features such as:

    
    
    * Strings
    * Reference counted GC
    * Lambda Expressions
    * Big numbers
    * Inline assembly/bytecode
    * A modest library of core functions

    As much as possible, most of the features and functions are written in the language itself. Big Integer support, math functions such as cos, sin, random and sorting functions were mostly an excercise in learning to implement the functions that almost always come for free with a language. There was a lot of reward in being able to implement complex libraries in a language I wrote myself.

    Whilst going through very old disks, I discovered the code and have uploaded it to GitHub for posterity and in the hopes that it helps students and teachers learn and teach compiler construction.

    ]]>
    http://www.abstractpath.com/2013/discovered-my-old-p-compiler/feed/ 0