[Browse] [Tag cloud]

Log on:
Powered by Elgg

C/C++ for Beginners :: Friends blog

March 22, 2011


Overall I am very happy with the outcome of this project. It is a mastermind game which, aside from being text based, has all of the functionality of the actual mastermind game.


The most difficult part of the project was calculating the number of pegs that were the correct colour, but in the wrong place. However, after creating several codes which did not calculate the correct value for certain peg combinations, I finally managed to create some code that worked 100% of the time.


The other difficulty I faced was running the code under Linux. Despite the code being completely correct according to the lab assistant, the system function for clearing the screen would not work. Other than this the program ran as it was supposed to.


I have learnt a huge amount about class systems in the C++ language while doing this project. Before this project I had not created an entire class from scratch, I had only needed to alter pre existing classes given to us in lectures. 


Posted by Aaron Wesley Groves | 0 comment(s) | Share

October 19, 2010

i think a better first program would be one where you have to type in hello, and it would print Hello (your name). eg. for me it would print Hello Aaron


this would teach a few more program commands, and produce a program that you have some input to

Posted by Aaron Wesley Groves | 0 comment(s) | Share

May 17, 2010

This is a topic that perhaps isn't explained enough on my course, probably due to the difficulty in realising what non-functional requirements are, and the impact they can have when missed, until you've encountered them in your own projects in a special "D'oh" moment.


 



Non-functional requirements, what are they and why do requirements analysts miss them?


Well non-functional requirements are concerns of the user that are not considered functionally vital to the system. For example, for a cash machine, functional requirements lie in the communication between machine and server, processing of the money (debiting the correct account/granting the machine access to dispense the money and issuing it to the user). The functional requirements tend to be more obvious in use cases and activity diagrams – well what must the actor/machine to be do next to reach the goal. Non-functional requirements of security, in this scenario, might be more obvious. Encrypted data transfer and point to point authentication, as well as user authentication (is this really the person who owns the bank card?) are all non-functional requirements. What might be forgotten in this case is overheads. If you were designing the system that was being implemented, how long does the proprietary bank server you're integrating with maintain it's login? Is it longer than it takes your system to setup the encryption protocol and send the required data to the server? Non-functional requirements such as accessibility for those who are visually impaired might also be something overlooked. Often these requirements aren't exposed by the company with the problem that you're here to solve, which makes it more difficult to expose them!


 


Without non-functional requirements, the system is likely to fail to meet its goals. It may “work” but it's unlikely to meet the needs of the customer. If a project reaches this state it can be costly to go back and start again. In my opinion this is why agile development can be so powerful in industry, customers get a chance to provide regular feedback and more opportunity to generate these missing requirements before it becomes an expensive problem to fix.


Keywords: agile developement, non-functional requirements, requirements analysis

Posted by Samuel Ross | 0 comment(s) | Share

March 15, 2010


The usefulness of objects and classes when using a vast amount of repeated objects was made clear during the implementation and development of this program. The idea of ‘wrapping’ these classes into an easier to use format was greatly used. It allowed actions to be performed more easily, without the extensive use of pointers, along with making the code far more readable. This was especially helpful when it came to the debugging stage as it clarified all of the functions in comparison to the array of objects originally being used.


Only seeding srand() once throughout the code allowed successful generation of random numbers. Multiple misplaced calls to this would result in the same ‘random’ number being generated.


The importance of user testing also became clear as one user suggested that it would be a good idea to reveal the computer’s hand after the game had either been won or lost. This provided the user some form of satisfaction that they had either not been cheated or allowed to win.


Program flow control statements had to be used extensively in order to ensure that the program’s output and processing made sense and was correct. This taught a logical way of ensuring that calls to functions were in the correct places along with teaching methods that can be used to debug in situations where many functions are called to produce outputs.


Posted by Ian Field | 0 comment(s) | Share

December 01, 2009

Everyone I talk to who is doing any kind of testing or development work, I like to introduce to Virtual Box. It’s sprung out of Sun’s development department and is perhaps the most flexible, free virtualisation environment I’ve come across. It’s fantastic! I don’t have time to write lots about it but here is a quick summary:

It’s free to download and use. In fact there is even an open source edition for all those who what it. Sun do pester you to register but it’s not mandatory.

It’s flexible in terms of what OS you can run in it. Linux, Windows, or something completely different it seems to support almost everything. I even had google android running in it for a brief period. It’s just so much better than Microsoft of VMware’s offerings on a small scale

it takes snapshots, excellent for dev or testing work. Install your OS, break your software and roll back to the previous snap shot to try again. It’s also great if you’re just trying out something like a Linux distribution that you don’t want to keep on your system.

 

So, if you're in need of a virtulisation environement try it out:  http://www.virtualbox.org/

 

 

Keywords: development, linux, testing, virtual pc, virtulisation, VMware

Posted by Samuel Ross | 3 comment(s) | Share

November 02, 2009

Subversion is a version control tool that is freely available at setup by ITNG for SSE students. Their documentation can be found at: http://wiki.sse.reading.ac.uk/wiki/ITNG:Subversion#TortoiseSVN

My post covers installing and setting up a project in subversion.

1.       image of the tortoise SVN download pageDownload Tortoise Subversion

2.       Install it, accepting all of the default options

3.       image of restart computer dialog after installing SVN

When prompted restart your computer

4.       Create a new folder

5.       name it appropriately

6.       Right click on the folder and go to the “Tortoise SVN” menu

7.       Click Import

8.       Enter the URL for your project (https://svn.sse.reading.ac.uk/svn/{username}/MyProject )

9.       image of SVN import screen

Click ok

10.   Enter your username and password when prompted (this is the same as your Uni username and password)

11.   Click  ok when it says the checkout has been finished.

12.   Now right click the same folder and click “Checkout”

13.   Enter the same URL in the repository textbox

14.   image of SVN checkout screenClick ok

15.   You’ll be prompted for your username and password again

You use update to download the files from the server and commit, which should appear on the menu after you’ve checked out a folder, to send changes back to the repository. You can optionally enter details of the files you’ve changed with each commit. This is a great feature for change tracking!

[Screen shots added 1/12/09 - hosted by www.sirnet.co.uk]

Posted by Samuel Ross | 2 comment(s) | Share

October 18, 2009

I was cleaning my hard-drive today and found this video from my first steps in robotics 3-4 years, ago. Watching it really inspired me, what can be done from LEGO, PIC microcontroller, a few servos and enthusiasm :) Hope you will like it :)

Keywords: humanoid hand, robotics

Posted by Svetlin Valentinov Penkov | 0 comment(s) | Share

October 13, 2009

Hello world is a great way to get to know a new language. But it's so impersonal.

I think that it would be much improved if you could be asked for your name and then the program run and output "Hello, <NAME>".

However I see that there is some difficulty in this with using C's implementation of strings, or rather char Arrays.

Posted by Ian Field | 3 comment(s) | Share

October 12, 2009

I think the SE1SA5 first programming practical needs to reflect the fact that people have never programmed before. Hello world is a suitable example of this, since you have the reward factor of it working and it's something simple to understand.

Most of your first session is getting used to the IDE. This is something I think it very important, and something SE1SA5 has perhaps failed on this year. I like that we're showing alternative IDE's like Eclipse, but it's too confusing in a first session. Either have 1 tutorial for Visual Studio or 1 tutorial for Eclipse. People seemed to be confused enough by a single IDE, let alone 2!

Another huge problem this year was the range of errors we got in the labs, N drives dropping in and out and various other errors. I realise these can't really be helped but it's something that really needs to be established to the whole group before they start, helpers included. Hopefully everyone will be used to the errors in the next few sessions and have ways around them.

 So what would my reccomendation for the first program be? "Hello World". Get the programmers into an IDE, get them to write hello world and then suggest expansions on it. using a simple program flow highlighted below would help them understand reading and variables.

1. write "enter name"

2. store name as var

3. Write "hello {name}"

The main thing with all new programmers is to make sure they're not overwhelmed. I remember being scared to touch the computers in the lab for fear of breaking them... it's always off putting when you have errors that aren't even your fault as well as having a practical to do. In the future we should keep it simple, but allow room for the advanced users to show off or maybe even encourage them to help others!

Posted by Samuel Ross | 1 comment(s) | Share

The first hello world program is rather naff! A better first c program should ask the program user for personal data such a name, age etc and print this to the screen, including a more interesting greeting message.

Posted by Andrew Peter Wonnacott | 1 comment(s) | Share

<< Back
/