Saturday, September 27, 2008

A short blurb

These days it look like laziness has become my preferred passtime, hence the lack of updates to this blog.

Here is my pathetic attempt for today:

A short Matrix style flipbook that is pretty cool.



Here is another animation that has been around for a while:



and the sequel:

Sunday, September 21, 2008

Fantastic Contraption

A quick blog post until I put my proper one up.

A few contraptions from the game Fantastic Contraption made by other players.

not mine
GrabTrain

Saturday, September 13, 2008

A4 Paper cuts

Here are a sample of some incredible sculptures from A4 paper by Peter Callesen:

There are a few other amazing works of his at his site

White Hand

The Short Distance Between

All in All

Closet

Eismeer

Impenetrable Castle

Looking Back

Snowballs

Friday, September 12, 2008

Truly Random

Here is a random gif to be enjoyed. Honestly there is not much to say about it, unfortunately I cannot reference it because I received it by email.

Thursday, September 11, 2008

Wired Portrait Contest

Wired has got another Portrait Contest up with some good submissions

Wired Photo Contest

This is my favourite photo so far.

Tuesday, September 9, 2008

AI programming language

I wonder if anyone has created a programming language that can create code based on simple commands.
For instance:

Input
I want a code that can add up all the numbers from 1 to 100.

Output

int output = 0;
for (i=1; i<=100; i++){
output=i+output;
}

There would have to be additional steps, but this would make basic coding very simple.
The issue would be to generate a good AI program to interpret the text and to suggest good examples.
Suggestive guessing has already been researched, for instance the 20 question game uses neural networks to guess what you are thinking. The users using this program expand the neural network the more it is used hence the guessing gets more accurate.

Room for thought, for now...

Monday, September 8, 2008

Cool Physics Videos

Here are some cool physics videos from Wired
Amazing Physics Videos
The Sound Waves on Fire and The Superconducting videos are really good.

Here are some alternative videos of Ferrofluid which are pretty cool

Amazing Physics Videos

Amazing Physics Videos

Sunday, September 7, 2008

Catagories in the Sidebar

Solved, but the solution is fairly complicated and messy.
If you are interested in just expanding your posts I suggest reading this post as it provides an interesting solution

  • Problem
      After looking for a widget that enables Catagories in the Sidebar, i.e. Coding, Games, etc, I have yet to find something that suits my needs.
      It is possible to use labels to catagorise my posts but this is not exactly what I'm looking for.
      What I would like is something like the Blog Archive widget. I would manually edit the script adding posts under their respective catagories.
      For instance

      Personal
      Personal post
      Coding
      PHP
      php post
      Reviews
      Game review

      As with the archive arrows would exist to hide/show the subsections.

      I think I will keep looking, although another options would be to code it myself using a show/hide javascript. That could be the solution, the problem being that at the moment I don't know how to do that...
  • Solution
      The Solution to this problem is pretty complicated although useful once it works.

      There are 4 components to implementing this:
      1. Javascript code
      2. CSS code
      3. HTML code
      4. minus and plus images

      The Javascript code is based on the MarkTree script. I removed all the parts which were not needed to give the following code:
      • Javascript Code
          var lastnode=null;
          var listnodes = null;

          function is_exp(n) {
          if (n==null) return false;
          return ((n.className=='exp') || (n.className=='exp_active'));
          }
          function is_col(n) {
          if (n==null) return false;
          return ((n.className=='col') || (n.className=='col_active'));
          }
          function is_basic(n) {
          if (n==null) return false;
          return ((n.className=='basic') || (n.className=='basic_active'));
          }
          function is_list_node(n) {
          if (n==null) return false;
          if (n.className==null) return false;
          if ( (is_exp(n)) ||
          (is_col(n)) ||
          (is_basic(n)) )
          return true; else return false;
          }
          function getsub (li) {
          if (li.childNodes.length==0) return null;
          for (var c = 0; c < li.childNodes.length; c++)
          if ( (li.childNodes[c].className == 'sub') || (li.childNodes[c].className == 'subexp') )
          return li.childNodes[c];
          }

          function onClickHandler (evt) {
          if (lastnode==null)
          {
          listnodes = document.getElementsByTagName('li');
          lastnode=listnodes;
          temp=listnodes;
          }
          var target = evt ? evt.target : event.srcElement;
          if (!is_list_node(target)) return;
          toggle(target);
          set_lastnode(target);
          }
          function setSubClass(node,name) {
          sub = getsub(node);
          if (sub==null) return;
          sub.className=name;
          }
          function toggle(target) {
          if (!is_list_node(target)) return;
          if (is_col(target)) {
          target.className='exp';
          setSubClass(target,'sub');
          // getsub(target).className='sub';
          }
          else if (is_exp(target)) {
          target.className='col';
          setSubClass(target,'subexp');
          // getsub(target).className='subexp';
          }

          }

      The CSS code is also based on the MarkTree script. As with the JS code I removed all the parts which were not needed to give the following code:
      • CSS Code
          div.basetext {
          margin-top:11px;
          margin-bottom:11px;
          margin-left:1%;
          margin-right:1%;
          padding-top:0px;
          padding-left:20px;
          padding-right:11px;
          padding-bottom:0px;
          text-align:left;
          font-weight:normal;
          }

          ul {
          margin-top:1px;
          margin-bottom:1px;
          margin-left:0px;
          padding-left:3%;
          }

          li {
          list-style:outside;
          margin-top:5px;
          margin-bottom:2px;
          }

          ul li {
          list-style:square;
          font-family:sans-serif;
          font-weight:normal;
          }

          li.basic {
          list-style:square;
          list-style-image:none;
          margin-top:2px;
          }

          .sub { display: none; }
          .subexp {display: block; }
          .sub { display: none; }
          .subexp {display: block; }

          li.exp_active,
          li.exp {
          list-style:square;
          list-style-image:none;
          margin-top:5px;
          cursor:pointer;
          }

          li.exp:hover {
          list-style-image:url("plus.png");
          margin-top:5px;
          cursor:pointer;
          background-color:#E4F8F3;
          }

          li.col_active,
          li.col {
          list-style:square;
          list-style-image:none;
          margin-top:5px;
          cursor:pointer;
          }

          li.col:hover {
          list-style-image:url("minus.png");
          margin-top:5px;
          cursor:pointer;
          background-color:#E4F8F3;
          }

          li.basic_active {
          list-style:square;
          list-style-image:none;
          background-color:#E4F8F3;
          margin-top:2px;

      The HTML code uses the css classes to determine what to do with the code as can be seen:
      • HTML Code
          The code has to start with the following line:
          <div id="base" class="basetext">
          This div class has the main styles attached to it

          If you want the first level expanded use the following code:
          <ul>
          <li class="col">Expanded level
          If you want the first level to be collapsed then
          (this also serves as the second level being collapsed if the first is open)
          <ul class="subexp">
          <li class="exp">Collapsed level
          After this use
          <ul class="sub">
          <li class="exp">Hidden level which can be expanded
          Then for the final level use
          <ul class="sub">Next level
          For the final level you can also use
          <ul class="sub">
          <li class="basic">This li class allows bullet points

          Then at the end remember to close everything
          </li>
          </ul>
          </div>

          Lastly one example to use if you didn't understand above

          <div id="base" class="basetext">
          <ul class="subexp">
          <li class="exp">
          <span style="">Test header 1</span>
          <ul class="sub">
          Test Text
          </ul>
          </li>
          <li class="exp">
          <span style="">Test header 2</span>
          <ul class="sub">
          Test Text
          </ul>
          </li>
          </ul>
          </div>

      The two images which can be saved straight from this blog need to be hosted somewhere so that the CSS code can refer to them as shown below:
      • Image Code
          list-style-image:url("minus.png");
          list-style-image:url("plus.png");

  • Thoughts
      1. I need to figure out how to change my js show/hide code in the post below to be initially hidden.
      2. Solved Will use a similar code to the sidebar, new todo
      3. I need to figure out how to jump around the post by use of links but I'm pretty sure a bit of js code could easily solve that -- Makes the summary section more useful if you can jump to the relevent section.
      4. Lastly a simple one, figure out how to indent... Solved Use & nbsp; source

Saturday, September 6, 2008

Customising my blog

Considering I have just started playing around with blogspot, I feel like publishing the sites and information that I'm using/gathering.

Summary
  1. Removing borders from your title and picture
  2. Changing the width of the blog, the sidebar and the main menu
  3. Archive entries into folders
  4. Code Comment Box
  5. Current Date and Time
  • Removing borders from your title and picture
    Source: Customize your blogger template
    ------------------------------------------------------------------------------------------------
      Method:
      1. Customize -> Edit Html
      2. Search for #header-wrapper { and #header { for the title
      3. Search for profile-img { for the profile picture
      4. Remove or comment out the following line border: 1px solid $bordercolor;
  • Changing the width of the blog, the sidebar and the main menu
    Source: Customize your blogger template
    ------------------------------------------------------------------------------------------------
      Method (using the minima template for inital size):

      The breakdown of the width of the blog is:
      Whole Blog - Text - SideBar = Extra
      660 -410 - 220 = 30
      If the extra is negative your sidebar will go to the bottom of the page, so try and keep some extra.

      Whole Blog:
      1. Customize -> Edit Html
      2. Search for #outer-wrapper { and #header-wrapper {
      3. Change width: 660px; to width: 700px; to change it to 700px
      4. As suggested in the original post the widest you should probably go is around 780 px, personally I went for 700px (remember people have different monitor and this is not a % its a defined width)
      Main Text:
      1. Customize -> Edit Html
      2. Search for #main-wrapper {
      3. Change width: 410px; to width: 430px; to change it to 430px
      Sidebar
      1. Customize -> Edit Html
      2. Search for #sidebar-wrapper {
      3. Change width: 220px; to width: 260px; to change it to 260px
      Final result

      Whole Blog - Text - SideBar = Extra
      700 -430 - 260 = 10

      So all good :D
      Use the Preview button to preview what it is going to look like an make small changes.
  • Archive entries into folders
    Source: Catagories in Sidebar Blog Post
    ------------------------------------------------------------------------------------------------
      The Solution to this can be found in the source link.
  • Code Comment Box
    Source: loadaveragezero
    ------------------------------------------------------------------------------------------------
      For my code I used loadaveragezero's code as a basis and modified is until I arrived at What I currently have:
      div.code-box {
      font-family: 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Monaco, Courier, monospace;
      white-space: pre;
      width: auto;
      line-height: 1.4em;
      margin: 1em 0;
      border: 1px dashed #aaa8a8;
      padding: 0.5em 0 0.3em 0.5em;
      font-size: 80%;
      color: #000;
      overflow: auto;
      }

      div.code-box {
      background: #fff url(http://loadaveragezero.com/img/cut.gif) no-repeat top right;
      }

      div.code-box a:focus,
      div.code-box:hover {
      background: #CFECEC url(http://loadaveragezero.com/img/cut.gif) no-repeat top right;
      }

      to use it I just use the div class i.e.
      <div class="code-box">

      Currently my only issue with it is that it can be difficult to scroll across occasionally.
  • Current Date and Time
    Source: Blogger hack
    ------------------------------------------------------------------------------------------------
      Blogger hack has a good solution to this. In addition you can add the time by including the following addition to your js code:

      var seconds = themelib.getSeconds();
      var minutes = themelib.getMinutes();
      var hours = themelib.getHours();

      document.write(hours+":"+minutes+":"+seconds+" ",dayarray[day] + ", " + montharray[month] + " " + daym + ", " + year);

Review of Spore

There has been a lot of anticipation over the release of Spore and having played it a bit I feel like adding/summerising the pool of thoughts and reviews out there.

Firstly I think Gamers Global sums it up very well:

GOOD: Unique linking of five different sub games (phases)
GOOD: Superb editor(s) for changing the looks of nearly everything in the game
GOOD: Tidal and City phase are worthwhile (albeit short) experiences
GOOD: Space phase is very motivating for about 6 hours
GOOD: The streaming of user generated content into your game
GOOD/BAD: The interface shines in the editor and works well in many parts of the game – but is also cumbersome in others (especially in Space phase)
BAD: Far too much micromanagement, especially in Space phase (e.g. the need to collect Spice periodically by visiting your solar systems)
BAD: Diplomacy does not really feel like interacting with a wide variety of aliens, they mostly act like humans although they “speak” differently. Diplomatic options are limited, too.
BAD: Not enough mission types, combined with an abundance of unsatisfying standard missions (attacking pirates, eco disasters) that “force” you to delay what you’re currently doing.
BAD: The design editors are about looks, not about functions: Where you put a weapon or some body armor is not important, the part will give you its bonus anyway. Also, the influence of your designs get less important with each phase.


My first impressions with spore were, WOW! The game is huge and the level of detail is crazy.

Initially in the first few stages you mold your creature together or grab already created creatures from the sporepedia. As mentioned above the design editor is about looks but the bonuses (attack, charm, etc) tend to determine what your create. Therefore there is a trade off between functionality and looks.

Once you get to the civ stage you get the ability to create vehicles (land, sea and air) which are almost effortless to create yet look remarkably good and before you know it you are in space.

What I like the most about the first few stage were that they blend so well together. You really start enjoying this creature you are creating and are sad to leave him/her behind.

Once you get to space the game expands like crazy and is very addictive. Although after about half of a day's play, the micro management does start to kill you -- or rather -- the constantly having to return to your planets to get rid of ufo's/enemy invaders or clear up ecological disasters.
Personally for someone like myself who loves the civilisation series I was looking forward to a game which had a bit more strategy to it. I really liked the creativity involved in spore but feel that so much more could have been done in the city and space parts.