Did you study Maths/Engineering (not software) @ University

Hey all.
I was wondering if anyone here who stuied / is studying a mathematical course at university would give me thier views on the cousre :slight_smile:

I am choosing what to study and i am considering:

Engineering (any disciplines / combined course)
Maths
Physics
Chemistry
[even Medicine]

but I am not quite sure yet. Im taking a gap year so what i decide to apply for will partly dictate what i will do in my gap year, but i have until September to decide.

Thanks :bigsmile:

I’m studying computer/information sience and that comes with quite some engineering (software engineering) and dedicated math, so in a way, yes I am

The main things we calculate are the correctness of algorithms, automata, logics etc.

im in electrical engineering, and the comp science guys take way more math than i do. their stuff is all algorithm based. im transfering to computer engineering, which is in same dept, so no real loss to me.

if you are looking for jobs after you graduate, though, they say EE is the way to go (at my school). too bad digital signal processing > me.

//counts courses with heavy math base (boolean algebra != math)…16-20, off top of my head. ew.

This is what i am studying, which has a lot of maths and of course a lot of engineering (software though)

Anyone wanna do my programming assignment for me??? :smiley: :bow: :stuck_out_tongue:

hope you like sscanf. mine doesnt look so tedious, does it? its a first project. http://www-courses.cs.uiuc.edu/~cs318/mp/mp1/mp1.html

Studied math for a while , hated it.

Yes, EE: BSEE '87, MSEE '93, ABD (All But Dissertation) EE

I have a degree in Electroacoustics from Salford. This course no longer runs but they still run Audio Technology and Acoustics, both are heavy on the maths and engineering.

Im a mechanical engineer. Maths are simply a tool to do mechanical calculations for us. :p I cant say I like maths that much, although I was rather good at it. :confused:

Well I’m an electrical engineer. I should have done software engineering. Less maths, less project management, physics was cool :wink: and more programming :slight_smile: would be what I’d have liked.
I love power though :wink: Tis very good. Maths isn’t that difficult, once ya hit 3rd year, they show ya all the good formulas and tell ya to forget the previous 2 years of heavy maths! Done! Woot!

Nah, J/k :wink:

Originally posted by hburrows83
This is what i am studying, which has a lot of maths and of course a lot of engineering (software though)
Anyone wanna do my programming assignment for me??? :smiley: :bow: :stuck_out_tongue:

Is that a 2nd year programming assignment? :expressionless:

Looks pretty easy.

Probably read it into a linked list, which will be sorted as you read it in :wink: Nice and Easy :slight_smile:

Linked_List object should have following variables:

  1. (optional) Boolean - End_Of_List (yes or no) which will indicate that this object is the last in the linked list.
  2. Entry *Entry_object_ptr - pointer to an object which contains all the details that appear in a single log entry.
  3. Linked_List *Previous_ptr - Points to the previous linked list entry
  4. Linked_List *Next_ptr - Points to next previous linked list entry

The Boolean is optional as you can just check that next_ptr/previous_ptr == Null. But if you are a sloppy programmer (like most engineers tend to be) it’s probably easier to check for that variable then always check that something = null. But you should Assert that the next ptr is not null before trying to access it, or you’ll end up with a seg fault :slight_smile:

You can probably also make the linked list single direction too and do away with the “previous” pointer. However, if for some reason they change specs and make you sort the list (ouch) then a doubly linked list will make life alot easier. wOOt! :slight_smile:

Your Entry_object will require:
You can just use int’s, or even short ints. Short ints should be faster. Unsigned means no negative numbers ever. Whatever you choose, JUST BE CONSISTENT. Also port number go up to 2^16, so make sure your chosen int type can handle 65536. Un signed short int can ->((2^16) -1).

unsigned int month = 0; (init) (1-12)
unsigned int day = 0; (init) (1 - 31)
unsigned int hour = 0; (init) (0-23)
unsigned int min = 0; (init) (0-59)
unsigned int sec = 0; (init) (0-59)
char *action; (6chars) *remember that this is just a ptr -> In C you may need to malloc for this. C++, u just say new char name[x] for x character array.
char *protocol; (3ish? check max length of protocol)
char *source_ip = " “; (12 chars)
char *dest_ip =” "; (12 chars)
unsigned int src_port = 0;
unsigned int dest_port = 0;
bool tcp_flags[6]; (set each to false)

There ya go, that’s a start.

  1. Create a new Entry_object object :slight_smile:

  2. Read in from log file. Ensure that the first and last entries are not Null (ie that the log file contains data).
    Save the srcip+dest_ports of the first and last entryentry (as a char [2,12] + int [2] ). (nice and easy ;))
    Make sure you keep a counter that counts how many times the read algorithm tries to read in from the file, then decrement 1 cos it needs to detect “EOF” :wink:

  3. Clear the console in buffer :- Get user input for the date (year month day) watch for buffer underflows/overflows. Use cin.get() to get a single char at a time. Slow, but ensure no buffer overruns :slight_smile:

  4. Check that the date is valid, if not, get system time.

  5. Get the current year from the time you just got ^^.

  6. Create a new file -> use the next pointers to access each entry in the linked list and then write each object to the output file in the correct way.

And hell no I’m not gonna do more :stuck_out_tongue:

Keep in mind the limitations of the number of entries in the log file is limited by the type of int you use for the counter. Please use unsigned. I’m sure the marker will be impressed if they find a -ve entry count :wink:

Also remember that filereads will return the last line of text twice, as the second time the EOF flag is set, but the file input buffer will still contain the previous line. Remember to check for EOF correctly :slight_smile:
Don’t make the newbie mistake of not making a large enough buffer for user input. Users are dumb. If you ask them for 8 characters, make the buffer 1024 chars. :stuck_out_tongue:
Don’t make the newbie mistake of not making an actual character array before writing something to the char pointer :wink:
Make sure all pointer initially point to null :wink:
Make sure pointers don’t == null before you access the object.
Don’t confuse nul (character nothing) with null (pointer nothing).
Remember to delete all the memory dynamically allocated for char arrays, and all objects.

Originally posted by ckin2001
hope you like sscanf. mine doesnt look so tedious, does it? its a first project. http://www-courses.cs.uiuc.edu/~cs318/mp/mp1/mp1.html

See what happens when marketters (obsessed with appearances) get to do the curriculum of the engineering department.

GUI programming. Gui’s are for wimps! CLI is for the real engineers :wink:

/me falls off my chair laughing at all the people believing the world is round.

Originally posted by debro
/me falls off my chair laughing at all the people believing the world is round.
as in its spherical not round:p

Originally posted by debro
GUI programming. Gui’s are for wimps! CLI is for the real engineers :wink:

gui’s are only for wimps if you use a toolkit. writing your own from scratch = pulling teeth

Originally posted by ckin2001
gui’s are only for wimps if you use a toolkit. writing your own from scratch = pulling teeth

Agreed, now if ya don’t mind, I’m gonna go brush “old chomper”, wax my scalp, and condition my last hair.

Originally posted by shuebhussain
as in its spherical not round:p

That’s what they want you to think!
And the internet doesn’t exist. You’ve all been brainwashed into believing it :wink:

I just cannot believe that there really is a “Flat Earth Society”!

//off topic
I mean really!
That’s like an “Oxygen is good” society, or a “The sky is blue” society.
//end off topic

or an “i like jello” society

also - is a wimp, i use toolkits whenever possible. after surviving a brush with nasm, i prefer waste over efficiency.

Originally posted by ckin2001
[B]or an “i like jello” society

also - is a wimp, i use toolkits whenever possible. after surviving a brush with nasm, i prefer waste over efficiency. [/B]

But it all really comes down to development time.

Efficiency isn’t really an issue with a GUI anyway. With any sort of user input, you’re wasting huge amounts of time waiting for the user anyway. Even file IO is relatively slow.

User input (60mins, no# crunching 20mins = 75%waiting for user)
File input (2mins, no# crunching 20mins = 9.090909% waiting for file system)

Tis only the time consuming guts of the program that really needs to be efficient.

Eg Multithreaded Matrice multiplication -> [1000,1][1,1000].
=[1000,1000]
Lemme see -> We have 1000
100010001000 multiplies? is that right? , not counting additions :stuck_out_tongue:

Additions would be 10001000(1000-1)

So in total 1009990000000 operations not including memory read/write.

Compare this to asking the user for 2000 cells, even using file IO, the File IO may very well take up much of the time, well not really.

(If written to be relatively efficient with 32threads in C++ it takes about 19minutes on a quad Pentium 3 600 - Unix OS - 1GB ram once it starts calculating the actual array values)

If it’s inefficient or buggy, it will likely take double the time, and possibly seg fault from memory leaks/unallocated pointers / etc.
Can you imagine 12MB of memory disappearing from mem leaks :wink:

Hehehehe.

Oh, and it takes me approx 1hr to actually type the values in (save to file for next time)

Or about 2minutes to load the 20K file into the matrices originally.