Programming in Engineering
Programming in Engineering
Lecture 2
Agenda
1 hour
Victor Miclovich
Today’s session might be our last this year... but the good thing is that
you are all getting the hang of things and programming in Python. Learning
to become good developers is the eventual goal of this ”program”.
These are things I shall expect from you after the holidays:
1. Commitment (there won’t be room for sloppiness or reviews of previous
work early next year )
2. Do all the assignments and readings that I shall still be sending you
weekly
3. Program! Meet S60 phone owners in this research group and do the
programs in the book I left. This by the way is the lab experiment
of this course. Because of our limited resources, we can’t always have
phones around... I prefer to use a real phone and not an emulator.
What are the advantages of having a real phone?
1
Reading list:
At the end of this... preferably after 1st January 2010, I will give you research
questions for a report you are to write in two weeks... So, I expect you to
keep notes on what you read. Not doing this implies that you might not
be as reliable and efficient to continue with this research group. These are
prerequisites for this research... I also want to warn you that MATHEMATICS
flows in every topic that I have listed... just thought you should know, don’t
be scared. I will give you a format on how to report research findings... it
will also be nice to do this as a group, but hand in different reports; I will
design a ”probability” program (or atleast pseudo-random) that will assign
you separate topics that you will write about in those 2 weeks.
Aim of this assignment
The aim of this assignment is to test the following:
The daily assignment is writing as many programs as you can in any language
of your choice1
1 Problems in Algorithms
1.1 Sorting
In today’s lecture I shall do the following the traditional way: on a chalk
board.
• Insertion sort
1
preferably Python
2
• Merge sort
• Asymptotic analysis
1.2 Complexity
Imagine a scenario where you have just come up with a recipe or algorithm
to shorten an engineering process be it reduction in time of churning some
cream in factory, or optimizing the way a circuit sends signals, etc.
I remember telling of you some algorithms that we are to use and enhance
• Multi-modal transfers
These are all algorithms... we shall initially look at naive algorithms then
work our way up to advanced algorithms. Why?
Everything from the User interface in a phone to basic phone utilities/services
in a development environment are all similar worldwide; we use known de-
sign patterns and procedures in development, but what makes a product
different from the rest? I think you can guess the answer: It’s performance.
Performance lies in the design of algorithms and their analysis.
4. Build a prototype: building this also requires another analysis and re-
quirements gathering stage... it is not wise to do every requirement
gathering as a fast step... in my own opinion I prefer that you iter-
atively gather requirements from your user and add features to every
3
stage of development or/and product... here you actually meet the tech
needs... like what kind of networks is your app going to work on, how
is it going to send data upstream2 , how is the app going to use the
phone’s resources to connect to a service, etc
6. The forever loop: every product isn’t 100% efficient... we shall always
keep refining the existing application... and if the worst case is to
come, create it from scratch...
• etc.
2
this means sending data to a server