Budding Programers

  • Do you want to be a programmer try a few tests.

    For example if you want to test the waters the best way is not to look online
    or google for help just yet.

    Try this alone, even turn off pc or tv for a few hours now and again.

    write sorting program numbers 1 to 10.
    in Ascending or Descending order.

    t = temp
    Count = 0 to 10 . 1++
    Input =1,2,4,5,6

    While Count not = 10
    B = Input[C+1]
    if B > A
    t = A
    B = A
    do print input
    when B = 1
    B = [C+1]
    if B not = [C+1]
    Temp = B.

    I have jotted down some ramblings which are prob not correct but to perhaps give you a direction
    to take or avoid.

    You don’t need to know any programming languages to attempt this but it will keep you busy.
    or perhaps you have an idea for a small program to be written by other members

  • I think 12 year olds do more advanced programming than that in school nowadays.

  • @gregcau:

    I think 12 year olds do more advanced programming than that in school nowadays.

    <title>Mah furst webpage</title>

    That is so true.

  • @Rickvs:

    <title>Mah furst webpage</title>

    That is so true.

    This is what I sometimes imagine the code for chivalry looks like.

  • @gndo:

    This is what I sometimes imagine the code for chivalry looks like.

    It can’t be because there’s a comment tag in there.

  • Those who can do tbh. Those who can’t , criticise or come up with excuses.
    Its doubtful as most UK Education is way behind most when it comes to programming and teaching at that stage.
    Its a know fact the best come out of japan/asia look at those coders, taught at a very young age way ahead of
    of the west

  • I’m in the UK and I didn’t get taught html until college, and that only because I chose a certain course. Not sure how it is now though.

  • Its terrible I was told. Considering the UK invented the web and nearly all pioneering computer ideas, our govs
    did not invest or help. Look at the enigma machine.
    film reference here:


    Turing is widely considered to be the father of theoretical computer science and artificial intelligence.

    They were more concerned with his private life at that time not , that they could have lead the world in.
    computers and tech.

  • Don’t forget Charles Babbage.

  • hmm I don’t know about him ( well I could cheat and google it but won’t ).
    Was it some thing called the difference engine ? 1866?

  • That was one of his early proposals, yes. But in 1822 or something.

  • @dudeface:

    Don’t forget Charles Babbage.

    such a useful machine he made tbh

  • Well if you really got stuck in as they say, without using the internet or google for code help.
    This puzzle would keep an active mind busy for ages. Once you can show it flows right on
    plain notepad or paper, even using words then the easy part is using any programming
    language with no prior knowledge of it or learning 10000 lines of syntax which is
    is a common road to nowhere and not productive tbh, you don’t need to know these
    languages well at all

  • You have to show what your doing and avoid rogue coders.
    For example
    Customer asks for his 12 numbers printed on screen in order.
    for x = 1 to 12;x++ ( add 1 each time eg loop counter)
    print x
    next x

    Off course that is a loop just printing 12 numbers in order regardless of customers numbers entered hehe.
    some sort of code example, prob varies for each lang with its syntax.

    So they don’t see what goes on under the bonnet as they say so you have to allow ways to peek for them.
    Plus integrity , yours esp. How many big public or private companies were infact lead astray by rogue pc
    projects and simply cancelled them costing the tax payers or business millions in some cases tbh.

  • i tried to learn programming, i know basic python but it was just too boring for me tbh

  • The only coding I’ve ever done was webpage design in highschool and I stole my culminating activity from my friend and slightly tweaked it.

  • Here are some examples each in its own language:<br /><br /><span style=“font-size:3px”><strong>Lang C </strong></span><br />#include <stdio.h> <br />int main()<br />{<br /> int array[100], n, c, d, swap;<br /> <br /> printf(“Enter number of elements\n”);<br /> scanf("%d", &n);<br /> <br /> printf(“Enter %d integers\n”, n);<br /> <br /> for (c = 0; c < n; c++)<br /> scanf("%d", &array[c]);<br /> <br /> for (c = 0 ; c < ( n - 1 ); c++)<br /> {<br /> for (d = 0 ; d < n - c - 1; d++)<br /> {<br /> if (array[d] > array[d+1]) /* For decreasing order use < */<br /> {<br /> swap = array[d];<br /> array[d] = array[d+1];<br /> array[d+1] = swap;<br /> }<br /> }<br /> }<br /> <br /> printf(“Sorted list in ascending order:\n”);<br /> <br /> for ( c = 0 ; c < n ; c++ )<br /> printf("%d\n", array[c]);<br /> <br /> return 0;<br />}<br /><br /><strong><span style=“font-size:3px”>Lang Java</span></strong><br />import java.io.BufferedReader;<br />import java.io.InputStreamReader;<br />import java.util.ArrayList;<br />import java.util.Iterator;<br /><br /><br />public class InsertionSort {<br /> <br /> <br /> public static int[] insertionSort(int[] list) {<br /> for (int i = 1; i < list.length; i++) {<br /> int next = list<em>;<br /> // find the insertion location while moving all larger element up<br /> int j = i;<br /> while (j > 0 && list[j - 1] > next) {<br /> list[j] = list[j - 1];<br /> j–;<br /> }<br /> // insert the element<br /> list[j] = next;<br /> }<br /> return list;<br /> }<br /> <br /> <br /> <br /> public static void main(String args[]) throws Exception<br /> {<br /> String list="";<br /> int i=0,n=0;<br /> <br /> InsertionSort s= new InsertionSort();<br /> ArrayList<Integer> arrlist=new ArrayList<Integer>();<br /> System.out.println(" “);<br /> System.out.println(” “);<br /> System.out.println(“Please enter the list of elements,one element per line”);<br /> System.out.println(” write ‘STOP’ when list is completed “);<br /> BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));<br /> while(!(list=bf.readLine()).equalsIgnoreCase(“stop”)){<br /> int intelement=Integer.parseInt(list);<br /> arrlist.add(intelement);<br /> <br /> }<br /> <br /> int elementlist[] = new int[arrlist.size()];<br /> Iterator<Integer> iter = arrlist.iterator();<br /> for (int j=0;iter.hasNext();j++) {<br /> elementlist[j] = iter.next();<br /> }<br /> <br /> elementlist=insertionSort(elementlist);<br /> System.out.println(” “);<br /> System.out.println(” “);<br /> System.out.println(” ");<br /> System.out.println("Values after Insertion Sort : “);<br /> for (int j=0;j<elementlist.length;j++) {<br /> System.out.println(elementlist[j]+” ");<br /> }<br /> }<br />}</em>

  • For a deeper understanding of these codes pm me.
    Later on I will show you a much simpler improved version written by me (in a few weeks)
    jotted down on my napkin in plain English that you can apply in any language.

    Some of you try this puzzle its not as daunting as the code pertains in each language example.

  • You would never write that code in java since there are already libraries for sorting. Part of programming is not reinventing the wheel.

    Though I recall reinventing many things during my computer science degree.

  • You do know the second section is actual java don’t you ? secondly writing bespoke libraries is useful.
    Why don’t you solve this using your science degree, it would be interesting to see.

Log in to reply