Version numbers, subversion, compiled binaries

Hello, I’ve had a think about my version numbers, and decided to revert to a 1.x system.  I never had a system before, so imagine the old version was in beta.  I will henceforth refer to the old version as “The Old Version”.

The new version is what is currently in development under the http://code.google.com/p/polargraph/source/browse/#svn%2Fcontroller%2Fbranches%2Fpolargraphcontroller_zoom branch.  I have a version number embedded in it, and I’ll update it when I remember to.  Once this version is stable enough, I’ll move it to the development trunk, replacing The Old Version.

A word about Subversion:

I don’t know how much folks know about software development and things like that, but most software that is developed is stored in a code repository along the way.  This is a centralised storage area that keeps track of the current code, but also all the previous versions that have ever been made.  So it keeps a full history.

What I do is check the code out of the repository, make my changes, and then commit the changes back into the repository.  Then if I realise that code is terrible, I can just roll back to a previous version.  There’s a few different kinds of Concurrent Version Systems (CVS), which is the generic term for this kind of code store.  I use Subversion (SVN) for no reason other than it’s what I’m used to, but GIT is another, and Mercurial is another.

Now, I’m saying this because this project is rapidly changing, and is no longer just a simple single-file program.  Compiling binaries, uploading and naming them is a pain since it has to be done manually for windows and mac every time there’s a change.  I hate doing it, so there’s a good chance I won’t always update the binaries every time I make a change.

If you want to keep absolutely up to date, then you should check the source out from the repository directly.  I use TortoiseSVN to do this.  It’s a shell extension for windows explorer that adds subversion tools to your folder.  Make an empty folder called polargraphcontroller_zoom, and right-click in it and choose “SVN Checkout”, and in the URL, enter the URL of the particular branch of the repository you want, in this case: https://polargraph.googlecode.com/svn/controller/branches/polargraphcontroller_zoom and hit OK.  It will download the complete repository branch into your folder, and what’s more, you can pull down the latest updates just by right-clicking on the folder and going to “SVN Update”.  This is a good way of keeping yourself in sync with the newest code.

Caveat

Remember sometimes I break things instead of fix them.  This is just to keep you on your toes.  No, really, I’m just a spanner.  So if you happen to update and something’s broke, that’s unlucky.  Either let me know, or wait until I notice myself.  I would prefer the former.

Branches and trunks

The code repository has files and folders just like a regular file system, but it is a convention (amongst SVN/CVS anyway) that each project has a trunk, where the main development occurs, and branches, where experimental stuff happens.  Things are trialled on branches, and eventually, if they work ok, they get merged into the trunk.  While things are still in branches, they are considered experimental, or unreliable.

On our project here, the trunk contains The Old Version.  Eventually I will merge the changes in the zoom branch into the trunk.  It will be a sad day.

Why I’m being tardy about this

I feel there’s still some changes to be done in the new branch, so I’m reluctant to go and update all my instructions everywhere if I’m just going to have to do it again in a week.  I’ve still got a couple of features I want to add, but I was also aware that the limitations of The Old Version were making things very difficult for some people, so that’s why I pushed the new code out.  BUT, if I’m honest, it’s still got some issues that need looking at, in terms of usability and efficiency.  I’ll add some new instructions and things once things have settled down a bit – in the meantime hopefully it’s not too much of a difficult beast to grasp, and you’ll let me know if something doesn’t work.

Cheers folks!

17 thoughts on “Version numbers, subversion, compiled binaries

  1. Hi Sandy,
    Thanks for all your hard work on this. I have tried to use your new program and i don’t understand how install the files from the branch, so I used your latest precompiled binaries for windows. It may be just me but I don’t seen to be able to get a jpeg or image on the screen. It will go as far as let me choose which one I want but it never seems to show up in your program after i choose it. Do you have an idea on what i may be doing wrong?
    Thanks for your last post explaining the code process. I’m trying to learn all this as I go, and having fun doing it. Have a great day.
    Matt

  2. Hi Sandy
    I figured out how to run your program with the individual files. I still can’t seem to get an image to show up on the screen. I have tried it on XP, Ubuntu, and Windows 7. I assume I missed something simple. Do you have an idea? Thanks
    Matt

        • I gave it a try and still no luck. I tried .jpg and .png. I guess I’ll try to go back to the old version. But I’ll try anything you got. Thanks and I’m looking forward to your update.
          Good day.
          Matt

          • Maybe you should first select the area (inside the paper) then load the image and maybe may be needed to click “resize image”.
            I’ve noticed that, with one of the last version, selecting an area outside the paper gives an error.

          • Matt, a couple of people have reported that issue, with the image just not showing up. I can’t seem to replicate it here, but I have just committed a couple of changes to the way I handle the images last night (1.0.3), so I might have fixed it by coincidence. Alex, I _could_ replicate that problem you had, so 1.0.3 aught to fix those too (hopefully). Moved to a more efficient, and sensible way of handling the images. Also changes the resize behaviour, so instead of selecting a box and fitting the image to it, I’ve just got a number spinner to grow/shrink the image. I think it’s a bit more intuitive, but there _was_ a reason for the old way of doing it. I just can’t remember what it was. Which way is best?

  3. Thanks for the update. But it pops up an error when I run it. It says “NullPointerException” and highlights

    float scaling = imageWidth / getImage().width;

    It is in the Machine page. I am using TortoiseSVN for the updates, it is easier. By this can you tell if I am missing something? I appreciate your help. Thanks,
    Matt

      • Thanks for the quick update. The program loaded great. This next part is hard to explain, but the image is still not right. With this latest update I wint through it about 20 times and I was able to get an image to appear about 4 times. It was never right away but after clicking buttons like move image and resize. One of the Images came in upsidedown and was as if one end was stuck to the top of the screen and trying to move or resize the picture only changed its shape to long and skinny with one end still touching the top of the computer screen.
        Then after trying to move the picture a few times the program froze every time. Then the Processing code page would give an error saying
        NullPointerException.
        It highlighted the line of code in the polargraphcontroller_zoom page saying:
        Image(getDisplayMachine().getImage(),imagePos.x,imagePos.y,imageSizeOnScreen.x,imageSizeOnScreen.y);
        I’m not sure if this makes since but that is what happened and I hope I was able to help. Thanks again and I appreciate all your time and help in this.
        Matt

        • Aha, yes I’ve got that now, I see what you mean. Not quite sure of the cause, but I can put in a fix, and the way around it until then is:

          Make a page using the setup tab->page width, page height, page y pos and then centre page. Don’t think the size matters.

          Then load your image, then move image to the middle of the page, _then_ do some resizing etc.

          That works for me.

          The real issue is that there’s lots of operations in it that expect there to be an image loaded and initialised, and if there isn’t, it gets a bit confused about it’s place in the world. Fairly straightforward fix to disable some of the controls that rely on that while an image isn’t loaded.

          Give it a shot Matt, fingers crossed, and I’ll write a fix in the meantime.

        • Try that now Matt, I’ve set the default page/image size/position to be something other than 0. You’ll need to update and then delete your polargraph.properties file so it can create a new one from scratch.
          Cheers!

  4. hi there!

    I’ve tried the new Arduino 1.0 code and I get the error :

    In file included from sketch_jan22a.cpp:2:
    C:\Program Files\arduino-1.0\libraries\AFMotor/AFMotor.h:1: error: stray ‘\357’ in program
    C:\Program Files\arduino-1.0\libraries\AFMotor/AFMotor.h:1: error: stray ‘\273’ in program
    C:\Program Files\arduino-1.0\libraries\AFMotor/AFMotor.h:1: error: stray ‘\277’ in program

    I’ve copied the new libraries to the Arduino1.0 folder..but I have no idea of whats going wrong there.

    hope you can help me
    thanks!!

    • Hi, well your AFMotor libraries are in the right place, but they might be the wrong format. I can replicate this error, and it’s to do with the text encoding of the AFMotor files being set to UTF-8 instead of ANSI. Did you just unpack them directly from the zip?

      Anyway, the fix is to open AFMotor.h in notepad and re-save it, but make sure the text encoding is set to ANSI. There’s a dropdown next to the save button on the save-as dialog for this. Save it as the exact same name. You might need to do it for AFMotor.cpp too if it’s also in the wrong format.

      Let me know how you get on.
      sn

Leave a Reply