<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming | Breek Een Been</title>
    <link>https://blog.breekeenbeen.nl/category/programming/</link>
      <atom:link href="https://blog.breekeenbeen.nl/category/programming/index.xml" rel="self" type="application/rss+xml" />
    <description>Programming</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>Rob Maas</copyright><lastBuildDate>Tue, 19 Apr 2011 13:41:31 +0200</lastBuildDate>
    <image>
      <url>https://blog.breekeenbeen.nl/images/icon_hue0c3a5851739ca8a2afc787728ee763e_182872_512x512_fill_lanczos_center_3.png</url>
      <title>Programming</title>
      <link>https://blog.breekeenbeen.nl/category/programming/</link>
    </image>
    
    <item>
      <title>Executing Bash Scripts Withinfrom Powershell</title>
      <link>https://blog.breekeenbeen.nl/post/executing-bash-scripts-withinfrom-powershell/</link>
      <pubDate>Tue, 19 Apr 2011 13:41:31 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/executing-bash-scripts-withinfrom-powershell/</guid>
      <description>&lt;p&gt;Sometimes you have processes which use multiple systems and if you are real lucky they cover multiple OS flavors, in this case I had a process which needs to make changes on Windows and Linux servers. Since Powershell was relatively new to me, I thought why not start with that. The Windows part was easily covered, but the Linux part, well euhm, takes a bit more effort. Unfortunately it is not possible (at least I don’t know how) to execute commands directly from Powershell within the Linux servers, so we had to create a workaround. It is easy to do this with the help of “
&lt;a href=&#34;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;plink&lt;/a&gt;”, plink is a backend tool for Putty and makes it possible to run SSH commands on a command line bases. Now we have tool which can execute commands through SSH within a Linux machine, it is relatively easy :-) See the example below. The bash script (helloworld.sh) which we want to execute:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-shell&#34;&gt;#!/bin/bash

function helloworld(){
  for i in {0..9}
    do
      echo &amp;quot;Hello World!&amp;quot;;
    done
}
helloworld;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Powershell script (testbash.ps1) which executes the bash script:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-powershell&#34;&gt;#Invoke-Expression -Command &amp;quot;&amp;amp; &#39;C:Program Files (x86)PuTTYplink.exe&#39; root@server ~/helloworld.sh&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>XNA 3D Pong</title>
      <link>https://blog.breekeenbeen.nl/post/xna-3d-pong/</link>
      <pubDate>Sun, 07 Mar 2010 20:09:56 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/xna-3d-pong/</guid>
      <description>&lt;p&gt;At school we got 2 XNA lessons, just to fill up our last weeks, since I hope to graduate this year. 2 lessons isn’t much, especially when you realize that that’s about 3 hours total. The last assignment of the XNA lessons was to create a simple 3D game with XNA. First I thought this got to be really, really easy, especially cause we build a 3d engine in OpenGL a year earlier. Unfortunately, it was a bit harder then I first thought. Displaying 3D objects in XNA is really easy, but creating a game with it, is a bit harder. There are just tons of tiny little things you just have to know, like a parent bone? I had never heard of it, but it is a bit essential when you create your own objects and want to use them. After all, with a lot of help from my friend called “The almighty Internet”, it seems that it is possible to create a very basic, simple 3D game in one day. Luckily for me, we have to work in pairs, so my classmate may fill in all the details :-). For those who are curious, &lt;a href=&#34;https://blog.breekeenbeen.nl/files/pong3D.rar&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; is the source code, but remember, I’m a complete n00b at XNA.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Some Examples of Design Patterns</title>
      <link>https://blog.breekeenbeen.nl/post/some-examples-of-design-patterns/</link>
      <pubDate>Fri, 06 Jun 2008 21:14:11 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/some-examples-of-design-patterns/</guid>
      <description>&lt;p&gt;Do you know that great feeling, when you learn something and it felt just into the right spot? This was happening to me, when I learned the existence of design patterns.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t program for a living, but it has always been a great hobby of mine. So when I found out, actually it was told to me what design patterns are and what they do. I was astunished, why didn&amp;rsquo;t I know this stuff? It is great to see some practical solution for things you ran into so many times, while coding.&lt;/p&gt;
&lt;p&gt;So design patterns are still new for me, but for school we had to work some of those patterns out in real code and since I&amp;rsquo;m very, very kind :-) and know what a suprise design patterns can be if you get the clue of them. I putted them on the web.&lt;/p&gt;
&lt;p&gt;So here they are four patterns I turned into real Java code. The downloads include the Java code, an image of a class diagram and the Umbrello file, which I used to create the class diagram. These are just examples, if you really wanted to know how the pattern work I would suggest you buy the &amp;ldquo;Gang Of Four&amp;rdquo; book or search the Internet, there is plenty of information about those patterns.&lt;/p&gt;















&lt;figure id=&#34;figure-observer-pattern&#34;&gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;ObserverPattern.png&#34; data-caption=&#34;Observer Pattern&#34;&gt;


  &lt;img src=&#34;ObserverPattern.png&#34; alt=&#34;&#34;  &gt;
&lt;/a&gt;


  
  
  &lt;figcaption&gt;
    Observer Pattern
  &lt;/figcaption&gt;


&lt;/figure&gt;

&lt;p&gt;Sorry for you non Dutch readers, some names and comments are in Dutch, but most of the code will speak for themselves.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/AbstractFactoryPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Abstract Factory Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/BridgePatternJava.zip&#34; target=&#34;_blank&#34;&gt;BridgePattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/CommandPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Command Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/ObserverPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Observer Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>
