75 days!
2/7
2/21
2/28
3/25
5/20
Team Selection
Client Presentations
Project Proposal
Revised Project Proposal
Final Project Documentation
No class
No class
No class
Project Presentations
5/02
No class
Implementation / Testing / Deployment
75 Days
Schedule a meeting with your TA!
TA will set up calendar invite
contact TA
will join if I can
Meaningful Names
Small Functions
Modular Functions
Function Arguments
Code Formatting
Comments
Object Oriented
Constructor
Instances / Instance Variables
Getters / Setters
Static Methods
Singleton Pattern
Singleton Pattern
Singleton Pattern
Database
Logger
db = Database.getInstance();
db.search('something');
db = Database.getInstance();
db.add(new_product);
db = Database.getInstance();
db.delete(new_product);
Logger.print('User logged in.');
Logger.print('Product deleted.');
db = new Database();
db.search('something');
db = new Database();
db.add(new_product);
logger = new Logger();
logger.print('Product deleted.');
logger = new Logger();
logger.print('User logged in.');
Singleton Pattern
same instances!
Restricts to only one instance of a class!
But why ?!
class Circle:
instance = None
def __init__(self):
'''
Constructs a circle.
'''
self.__radius = 7 # this is private
self.__radius2 = 1
print('called constructor')
def setRadius(self, radius):
if radius == 7 or radius == 8:
self.__radius = radius
def getRadius(self):
return self.__radius
def getRadii(self):
'''
Returns a list of both values.
'''
return [self.__radius, self.__radius2]
def draw(self):
print('O'*self.radius)
@staticmethod
def getInstance():
if Circle.instance == None:
Circle.instance = Circle()
return Circle.instance
public final class Circle {
private static final Circle INSTANCE =
new Circle();
private Circle() {}
public static Circle getInstance() {
return INSTANCE;
}
}
Lazy loading!
Database Connector
Class 1
Class 2
Class 3
Class 4
Class 5
db = new Database();
db = new Database();
db = new Database();
3 instances!
3x Memory!
Database Connector
Class 1
Class 2
Class 3
Class 4
Class 5
db = Database.getInstance();
1 instance!
db = new Database();
db = Database.getInstance();
db = Database.getInstance();
Start of Application
First Database Access
db = new Database();
Database Connector
Class 1
Class 2
Class 3
Class 4
Class 5
db = Database.getInstance();
1 instance!
db = new Database();
db = Database.getInstance();
db = Database.getInstance();
Start of Application
First Database Access
db = new Database();
Lazy Loading!
Lazy loading is a programming practice in which a component is loaded only at the time of need
class Circle:
instance = None
@staticmethod
def getInstance():
if Circle.instance == None:
Circle.instance = Circle()
return Circle.instance
public final class Circle {
private static final Circle INSTANCE =
new Circle();
public static Circle getInstance() {
return INSTANCE;
}
}
public final class Circle {
private static final Circle INSTANCE = null;
public static Circle getInstance() {
if (!INSTANCE) {
INSTANCE = new Circle();
}
return INSTANCE;
}
}
runs at Application Start
runs on demand
Circle.getInstance();
Lazy Loading!
Buy vs. Build
Buy vs. Build
$10,000
$10,000
$10,000
$10,000
$10,000
$500
$500
They just sell this component over 20 times.
Buy vs. Build
No Code Access!
Who fixes bugs?
And, how fast?
What about interfaces between our code and the bought component?
Migration and Support Team!
Super Coder
Expand Your Coding Knowledge
Know As Many Tools As Possible
Improve Your Communication Skills
Think Big Picture
Understand All Solutions Are Not Equal
Build and Break Stuff
The fastest way to becoming a 10xer is to get your 10,000 hours of programming in. This will enable you to perfect your skills and increase your ability to consume and process technical information. No one became an expert overnight, nor between the hours of 9–5. If you really want to become a 10x engineer, you’re going to have to dive in and learn.
10x engineers don’t actually call themselves 10x engineers. They go out and crush it. They build great products, solve hard problems, and make everyone around them better. They’re not just better, they’re faster than your average engineer. You’ll just know a 10xer when you see how they work.
If you dedicate yourself to writing code all the time, and improve your skills in these six areas, you are going to be one hell of an engineer. Anyone will pay top dollar to hire you. Why wouldn’t they? You are a unicorn.
Hands-on Series!
C++ Basics
C++ Functions and Classes
C++ Arrays and Vectors
C++ Templates
C++ and Python with Cython!
conda install xeus-cling -c conda-forge
Noun Identification
Technique to define classes and objects
Identify Nouns in Text
Prof. Kenneth Fletcher
A system generates weather maps using data collected from unattended weather stations. Each weather station collects meteorological data and produces summaries of the data. On request, it sends the summary information to an area computer. The area computer uses a database of digitized maps to generate a set of local weather maps.
Noun Identification
Prof. Kenneth Fletcher
A system generates weather maps using data collected from unattended weather stations. Each weather station collects meteorological data and produces summaries of the data. On request, it sends the summary information to an area computer. The area computer uses a database of digitized maps to generate a set of local weather maps.
Noun Identification
Prof. Kenneth Fletcher