• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:03
CET 08:03
KST 16:03
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL22] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11[ASL22] Ro16 Preview: Holy Diver5
Community News
Weekly Cups (October 19-25): Clem triples first in 5.0.171Evil Geniuses - shutting down16ISSL (IntoTheTV x SOOP SC2 League): Premier5Weekly Cups (October 12-18): 5.0.17 era begins1[$1250] International ShieldBattery League86
StarCraft 2
General
Weekly Cups (October 19-25): Clem triples first in 5.0.17 REPORT: StarCraft 2: Remastered In Development Evil Geniuses - shutting down How do you feel about the mass reverts in the 5.0.17 PTR? Team Liquid Map Contest #22: Results and Winners
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 ScienceCraft (October 24-25) - Live Event Sparkling Tuna Cup - Weekly Open Tournament ISSL (IntoTheTV x SOOP SC2 League): Premier WORTEX Challenger Series — Open SC2 LAN in Budapes
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps [A] Nemrods 1/4 players [M] (2) Sweltering Sands
External Content
Mutation # 549 Endless Sparkles The PondCast: SC2 News & Results Mutation # 548 Shining Bright Mutation # 547 Temple Of Terror
Brood War
General
[BW] Looking for Clan Thread! [ASL22] Finals Preview: Sweet Victory! Recent recommended BW games [Megathread] Daily Funny Videos Hands of Pluto
Tourneys
[$1250] International ShieldBattery League [Megathread] Daily Proleagues [ASL22] Grand Finals [BSL23] RO24 Group C
Strategy
50,000-Word Terran Builds Memo 2026-10-22 Cliff Jump Revisited (1 in a 1000 strategy) Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Mobile Legends: Bang Bang Armies of Exigo - YesYes? General RTS Discussion Thread
Dota 2
Dota 2 Champions League Season 3 Begins April 25!
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread European Politico-economics QA Mega-thread US Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
Reynor Fan Club The Flash Fan Club Serral Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Recent Gifted Posts
Blogs
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
[ASL22] Ro4 Day1 Ticket Giv…
bITt.mAN
Can Bots Beat Pros?? Starcr…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 9258 users

The Big Programming Thread - Page 384

Forum Index > General Forum
Post a Reply
Prev 1 382 383 384 385 386 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Manit0u
Profile Blog Joined August 2004
Poland17865 Posts
Last Edited: 2013-11-01 09:00:36
November 01 2013 08:28 GMT
#7661
On November 01 2013 17:17 sob3k wrote:
Show nested quote +
On November 01 2013 16:27 Manit0u wrote:
Guys, a quick question for you. Do you know how to make the <footer> stick to the bottom of the page in HTML/CSS without reverting to putting everything into a big content-wrapper <div> and setting position: absolute; bottom: 0; to the <footer>?

I'm trying to make a fairly simple page and it's important that it follows a clear logic structure:

<header> (top of page, with <nav> section etc.)
<article> (actual page content)
<footer> (bottom of the page, copyright, site map etc.)

For some reason, if I won't wrap everything into one big <div> with height: 100% etc. the <footer> will overlap with <article> section and display itself in the middle of the page. It's driving me nuts.

+ Show Spoiler [HTML] +


<!DOCTYPE html>
<html>

<head>
<title>Some Simple Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="styles/site.css"/>
</head>

<body>

<div class="content-wrapper">

<header>

<img src="images/logo.png" class="logo">

<nav id="menu">
<ul>
<li><a class="active" href="#">Menu</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Staff</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>

<h1 class="title">Some Simple Website</h1>

</header>

<article>
<ul>
<li><h2>About Us</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Gallery</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Staff</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Contact</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<footer>

<ul>
<li><h3>&copy; 2013</h3></li>
<li><h3>Author: John Doe</h3></li>
</ul>

<nav>
<ul>
<li><a href="#">Back to Top</a></li>
<li><a href="#">Site Map</a></li>
</ul>
</nav>

</footer>

</div><!-- .contnet-wrapper -->

</body>

</html>



+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: absolute;
bottom: 0;
border-top: 1px solid #E7E7E7;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 500px;
height: 300px;
margin: 0;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 50px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 220px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}



Note: The above code is still very early in the works, so it's not very clean


Why is your footer using absolute positioning? Absolute positioning removes the element from the document flow. If you use relative positioning and put it below the articles it will naturally be pushed to the bottom of the page by them. If you want it to always show at the bottom of the screen then you would used position: fixed.


I don't want to make it fixed. Had to use absolute because with relative it wasn't pushed below articles and I have no idea why (tried it in various configurations and with different settings). I don't want to use the content-wrapper div or absolute positioning either, but for now it's the only way I can make it work. I checked the web and it seems that everyone is using this solution...

Edit: it works with relative position and inline-block display, but I still have to keep the content-wrapper, which I don't want to do.

+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: relative;
display: inline-block;
border-top: 1px solid #E7E7E7;
margin-top: 50px;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 460px;
height: 300px;
margin-left: 40px;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 60px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 240px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}


Time is precious. Waste it wisely.
Yoshi-
Profile Joined October 2008
Germany10227 Posts
Last Edited: 2013-11-01 11:24:19
November 01 2013 11:17 GMT
#7662
I always need to laugh reading those x vs y discussions, always shows how clueless people are.


And I always find the link phar posted absolute hilarious:
Subclasses cannot override private methods. Subclass overrides of public methods can’t even see, let alone call, the superclass’s private methods. Problematic for, say, test mocks.


What kind of shitty argument is that? This is how private is supposed to work.


Or this:

new, private, public, protected, static, etc. Trying to win over Java developers? I’m aware this is more personal taste, but I don’t know why this stuff is necessary in a dynamic language—in C++ most of it’s about compilation and compile-time name resolution.


He clearly doesn't even fully understand OOP.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
November 01 2013 11:27 GMT
#7663
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-11-01 11:55:59
November 01 2013 11:40 GMT
#7664
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


Off the top of my head.

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

What is the difference between overloading and overriding?

Design using UML how you would implement a rectangle, triangle, and circle class.

What is the difference between a Set, Array, Collection, Hash?

http://codility.com/c/intro/demoV33ZXX-KF8

http://projecteuler.net/

Here's a quiz I prepared earlier
+ Show Spoiler +

General

1. What is functional decomposition?

2. Name 2 major forms of abstraction

3. What is an expression?

4. Name 3 different programming paradigms

5. What is the main difference between structured and procedural programming?

6. What is Control Flow?

7. What is a Side-Effect?


Object Oriented Specific

1. Briefly describe the thought process required in OOP.

2. Name 4 principles of OOP.

3. How can Generalisation be an abstraction?

4. What OOP concept can used to Generalise objects?

5. Name 2 forms of polymorphism.

6. Name 3 things an object can do.

7. Name 3 different design patterns.

8. What is a classification and how does it relate to programming?


Answers
+ Show Spoiler +

General

1. What is functional decomposition?
One of the fundamentals of programming where problems are broken down into their simplest form and one tries to find ways or methods of dealing with each small problem one step at a time. When these problems are solved, one can re-use these methods to handle an even bigger problem.

2. Name the 2 major forms of abstraction
Functional abstraction
Data abstraction

3. What is an expression?
An expression is any unit of code that when combined will reveal itself in the form of a value.

4. Name 3 different programming paradigms
[Most obvious ones]
Procedural
Object-Oriented
Functional
(There are at least 100 more)

5. What is the main difference between structured and procedural programming?
Structured programming abolishes the use of the 'goto' statement that altered the step-by-step process of going through code, as well as only having a single point of entry and exit in a subroutine. A programmer now would only have to think in terms of 'sequence', 'selection', 'repetition' without having to even consider an unsuspecting jump, exit, or entry point in the code, allowing programmers to make better assumptions about someone else's code or even their own code.

6. What is Control Flow?
Used to refer to the order in which statements are called.

7. What is a Side-Effect?
When an interaction with a piece of data affects the behaviour of other operations which rely upon it.

Object Oriented Programming

1. Briefly describe the thought process required in OOP
We must see our program in terms of objects and the role they play in a particular problem domain.

2. Name the 4 core principles of OOP.
Abstraction (or Classification)
Encapsulation
Inheritance
Polymorphism

3. How can Generalisation be an abstraction?
An object can be referred to and grouped as a part of a family of related concepts or roles.

4. What OOP concept can used to Generalise objects?
Inheritance

5. Name 2 forms of polymorphism.
Universal
Parametric
Inclusion
Subtyping
Ad-Hoc
Coercion
Overloading

6. Name 3 things an object can do.
Do things (methods)
Know things (fields)
Collaborate
Perform services
Perform operations
Many others

7. Name 3 different design patterns.
Double Dispatch
Composite
Factory
(Atleast 100 to choose from)

8. What is a classification and how does it relate to OOP?
Classification refers to the category or taxonomy of an object. The idea of object classification is to organise elements or concepts into particular groups, roles, responsibilities, etc. In programming this is called a class, we can use classes to represent these elements as code.


You have a week so I wouldn't bother going through anything difficult, you will just suffer from information overload.

Nothing beats pure experience and just immersing yourself in programming. Just keep doing what you are doing I'd say.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
Encdalf
Profile Joined February 2012
Germany66 Posts
Last Edited: 2013-11-01 13:26:26
November 01 2013 13:25 GMT
#7665
On November 01 2013 17:28 Manit0u wrote:
Show nested quote +
On November 01 2013 17:17 sob3k wrote:
On November 01 2013 16:27 Manit0u wrote:
Guys, a quick question for you. Do you know how to make the <footer> stick to the bottom of the page in HTML/CSS without reverting to putting everything into a big content-wrapper <div> and setting position: absolute; bottom: 0; to the <footer>?

I'm trying to make a fairly simple page and it's important that it follows a clear logic structure:

<header> (top of page, with <nav> section etc.)
<article> (actual page content)
<footer> (bottom of the page, copyright, site map etc.)

For some reason, if I won't wrap everything into one big <div> with height: 100% etc. the <footer> will overlap with <article> section and display itself in the middle of the page. It's driving me nuts.

+ Show Spoiler [HTML] +


<!DOCTYPE html>
<html>

<head>
<title>Some Simple Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="styles/site.css"/>
</head>

<body>

<div class="content-wrapper">

<header>

<img src="images/logo.png" class="logo">

<nav id="menu">
<ul>
<li><a class="active" href="#">Menu</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Staff</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>

<h1 class="title">Some Simple Website</h1>

</header>

<article>
<ul>
<li><h2>About Us</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Gallery</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Staff</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<article>
<ul>
<li><h2>Contact</h2></li>
<li><p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est
laborum.</p></li>
<li><a href="#">More</a></li>
</ul>
</article>

<footer>

<ul>
<li><h3>&copy; 2013</h3></li>
<li><h3>Author: John Doe</h3></li>
</ul>

<nav>
<ul>
<li><a href="#">Back to Top</a></li>
<li><a href="#">Site Map</a></li>
</ul>
</nav>

</footer>

</div><!-- .contnet-wrapper -->

</body>

</html>



+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: absolute;
bottom: 0;
border-top: 1px solid #E7E7E7;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 500px;
height: 300px;
margin: 0;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 50px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 220px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}



Note: The above code is still very early in the works, so it's not very clean


Why is your footer using absolute positioning? Absolute positioning removes the element from the document flow. If you use relative positioning and put it below the articles it will naturally be pushed to the bottom of the page by them. If you want it to always show at the bottom of the screen then you would used position: fixed.


I don't want to make it fixed. Had to use absolute because with relative it wasn't pushed below articles and I have no idea why (tried it in various configurations and with different settings). I don't want to use the content-wrapper div or absolute positioning either, but for now it's the only way I can make it work. I checked the web and it seems that everyone is using this solution...

Edit: it works with relative position and inline-block display, but I still have to keep the content-wrapper, which I don't want to do.

+ Show Spoiler [CSS] +


html, body {
width: 100%;
height: auto;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}

header {
width: 1000px;
height: 200px;
margin: 20px auto 50px auto;
border-bottom: 1px solid #E7E7E7;
display: block;
}

footer {
width: 1000px;
height: 70px;
position: relative;
display: inline-block;
border-top: 1px solid #E7E7E7;
margin-top: 50px;
}

footer nav {
height: 40px;
}

footer nav ul, footer ul, #menu ul, article ul {
list-style: none outside none;
padding: 0;
margin: 0;
}

footer nav li, footer li {
display: inline-block;
width: 300px;
position: relative;
float: left;
margin-left: 200px;
}

footer h3 {
font: 12px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
}

footer nav a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
}

footer nav a:hover {
color: #20ADA1;
}

.content-wrapper {
width: 1000px;
min-height: 100%;
height: auto;
margin: 0 auto;
display: block;
}

article {
width: 460px;
height: 300px;
margin-left: 40px;
display: inline-block;
float: left;
}

article h2 {
font: 25px bold Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
}

article p {
font: 14px Arial, sans-serif;
color: #8A8A8A;
letter-spacing: 1px;
text-indent: 20px;
width: 400px;
}

article a {
font: 12px Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
display: block;
float: right;
position: relative;
margin-right: 60px;
}

article a:hover {
color: #20ADA1;
}

img.logo {
width: 200px;
height: 200px;
margin-left: 30px;
display: inline-block;
float: left;
position: relative;
}

#menu {
width: 510px;
height: 40px;
margin-top: 60px;
margin-left: 200px;
border-bottom: 1px solid #E7E7E7;
display: inline-block;
float: left;
position: relative;
}

#menu li {
display: inline;
}

#menu a {
font: 20px bold Arial, sans-serif;
color: #E7E7E7;
text-decoration: none;
letter-spacing: 1px;
margin-left: 10px;
margin-right: 10px;
}

#menu a.active {
color: #20ADA1;
}

#menu a:hover {
color: #20ADA1;
padding-bottom: 15px;
border-bottom: 5px solid #20ADA1;
}

h1.title {
font: 36px bold large Arial, serif;
color: #20ADA1;
letter-spacing: 1px;
height: 45px;
width: 450px;
margin-left: 240px;
margin-top: 25px;
display: inline-block;
float: left;
position: relative;
}





To be honest, I'm not sure I completely got what you wanted there, but let's try it the way I understood it:
From what I got there you want to have a page with the head on top, then a couple of articles and the footer at the bottom.
And the footer should not be fixed, so it stays while crolling, instead simply below the content. From your html and css I understood that you wanted the articles to be displayed two in a row, centered on the page.
So far, thats actually pretty simple, if you wouldn't add that unusual request to no use a limiting container div.

Anyway, I used your html as reference and build a skeleton out of it. (different css though)
http://jsfiddle.net/ZrGQs/
Difference here is that the container ".content-wrapper" is ow called ".limiter" and only wrapped around the articles.
As for the clearfix, you could either use a clearfix, or simply a clear both on the footer. Depends on the additional usage of the limiter. (see http://jsfiddle.net/ZrGQs/1/ )

Now that one got only one update (http://jsfiddle.net/ZrGQs/2/ ), which is basically
article:nth-of-type(2n+1){
clear: left;
float: left;
}

As a fix for when the articles arn't the same height, which easily coud happen when filled with different content.
This is, in my optionion, a pretty solid cross browser solution, but your reueqst was to remove the container...

Removing the limiter and at the same time centering the content called for display: inline-block and text-align: center
Which results in basically http://jsfiddle.net/5FeAm/1/
However I couldn't find a way to limit the articles to two per row. Instead they use up the available horizontal space.
You could add a <br> after every second article (http://jsfiddle.net/5FeAm/2/) but that's not an elegant solution either.
If someone finds a solution for that, I'd be happy to hear it.

Approaching it from a different angle, I went back to "float" and let the articles float again, using the above selector to break into a newline after two articles. But since there is no limiting and centering div, the only option I saw to get them centered was to use a margin-left, which had to be calculated:

article:nth-of-type(2n+1){
clear: left;
float: left;
margin-left: calc(50% - 480px);
}

Resulting in the full code: http://jsfiddle.net/dZFA2/
The downside is of course the usage of calc which isn't exactly cross browser compatible (yes, you could polyfill but stilll..)

Any real elegant cross browser solution? For now I couldn't come up with any, maybe someone else has an idea? Except to stick to the limiter div, it saves you trouble.
And if my idea of what you wanted in the first place is completely differenct from what I tried to solve.. well..at least the laundry is done by now..
Rotodyne
Profile Blog Joined July 2005
United States2263 Posts
November 01 2013 16:38 GMT
#7666
Hey Manit0u,

When I remove the container div and change the footer code to


footer {
width: 1000px;
height: 70px;
border-top: 1px solid #E7E7E7;
}


The footer stays at the bottom. From what I can see the only difference is the articles are no longer centered?
I can only play starcraft when I am shit canned. IPXZERG is a god.
autechr3
Profile Joined May 2013
United States58 Posts
November 01 2013 19:55 GMT
#7667
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


I'll share the problem who's correct solution got me my job:

Write a function that takes in any integer and displays the time as a string. Think standard wall clock that only has a minute hand.

+ Show Spoiler +
Input: 90
Output: 12:15

+ Show Spoiler +
Input: 450
Output: 1:15

+ Show Spoiler +
Input: -90
Output: 11:45


You can't not rax as terran
Chairman Ray
Profile Blog Joined December 2009
United States11903 Posts
November 01 2013 20:04 GMT
#7668
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


Exception handling as well!
Zorkmid
Profile Joined November 2008
4410 Posts
November 01 2013 21:25 GMT
#7669
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


No tips, but I've seen guides that have common programming interview questions. I'm not sure if any of them are useful, maybe someone else can enlighten.
Chocolate
Profile Blog Joined December 2010
United States2350 Posts
November 01 2013 22:14 GMT
#7670
On November 02 2013 04:55 autechr3 wrote:
Show nested quote +
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


I'll share the problem who's correct solution got me my job:

Write a function that takes in any integer and displays the time as a string. Think standard wall clock that only has a minute hand.

+ Show Spoiler +
Input: 90
Output: 12:15

+ Show Spoiler +
Input: 450
Output: 1:15

+ Show Spoiler +
Input: -90
Output: 11:45



Excuse me for being dumb, but I do not understand what you are trying to model. Why is your input 90 (unclear units..., maybe minutes[?]) equal to 15 minutes each?

Regardless I feel like if I actually understood what the input and output were that would be stupidly easy. I'm taking an intro CS class and could do that. I had no idea that programming jobs would mostly just expect you to be able to write things like that. Better start sending out my resume
DeltaX
Profile Joined August 2011
United States287 Posts
November 01 2013 22:18 GMT
#7671
Maybe it takes degrees? Only thing i can think of tbh.
Zocat
Profile Joined April 2010
Germany2229 Posts
Last Edited: 2013-11-01 22:42:12
November 01 2013 22:36 GMT
#7672
Standard job interview questions suck.
Ideally you would avoid jobs which ask those standard questions.

On November 01 2013 20:40 sluggaslamoo wrote:+ Show Spoiler +

On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


Off the top of my head.

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

What is the difference between overloading and overriding?

Design using UML how you would implement a rectangle, triangle, and circle class.

What is the difference between a Set, Array, Collection, Hash?

http://codility.com/c/intro/demoV33ZXX-KF8

http://projecteuler.net/

Here's a quiz I prepared earlier
+ Show Spoiler +

General

1. What is functional decomposition?

2. Name 2 major forms of abstraction

3. What is an expression?

4. Name 3 different programming paradigms

5. What is the main difference between structured and procedural programming?

6. What is Control Flow?

7. What is a Side-Effect?


Object Oriented Specific

1. Briefly describe the thought process required in OOP.

2. Name 4 principles of OOP.

3. How can Generalisation be an abstraction?

4. What OOP concept can used to Generalise objects?

5. Name 2 forms of polymorphism.

6. Name 3 things an object can do.

7. Name 3 different design patterns.

8. What is a classification and how does it relate to programming?


Answers
+ Show Spoiler +

General

1. What is functional decomposition?
One of the fundamentals of programming where problems are broken down into their simplest form and one tries to find ways or methods of dealing with each small problem one step at a time. When these problems are solved, one can re-use these methods to handle an even bigger problem.

2. Name the 2 major forms of abstraction
Functional abstraction
Data abstraction

3. What is an expression?
An expression is any unit of code that when combined will reveal itself in the form of a value.

4. Name 3 different programming paradigms
[Most obvious ones]
Procedural
Object-Oriented
Functional
(There are at least 100 more)

5. What is the main difference between structured and procedural programming?
Structured programming abolishes the use of the 'goto' statement that altered the step-by-step process of going through code, as well as only having a single point of entry and exit in a subroutine. A programmer now would only have to think in terms of 'sequence', 'selection', 'repetition' without having to even consider an unsuspecting jump, exit, or entry point in the code, allowing programmers to make better assumptions about someone else's code or even their own code.

6. What is Control Flow?
Used to refer to the order in which statements are called.

7. What is a Side-Effect?
When an interaction with a piece of data affects the behaviour of other operations which rely upon it.

Object Oriented Programming

1. Briefly describe the thought process required in OOP
We must see our program in terms of objects and the role they play in a particular problem domain.

2. Name the 4 core principles of OOP.
Abstraction (or Classification)
Encapsulation
Inheritance
Polymorphism

3. How can Generalisation be an abstraction?
An object can be referred to and grouped as a part of a family of related concepts or roles.

4. What OOP concept can used to Generalise objects?
Inheritance

5. Name 2 forms of polymorphism.
Universal
Parametric
Inclusion
Subtyping
Ad-Hoc
Coercion
Overloading

6. Name 3 things an object can do.
Do things (methods)
Know things (fields)
Collaborate
Perform services
Perform operations
Many others

7. Name 3 different design patterns.
Double Dispatch
Composite
Factory
(Atleast 100 to choose from)

8. What is a classification and how does it relate to OOP?
Classification refers to the category or taxonomy of an object. The idea of object classification is to organise elements or concepts into particular groups, roles, responsibilities, etc. In programming this is called a class, we can use classes to represent these elements as code.


You have a week so I wouldn't bother going through anything difficult, you will just suffer from information overload.


Nothing beats pure experience and just immersing yourself in programming. Just keep doing what you are doing I'd say.


Singling you out (sorry!)
Those questions have nothing to do with "experience" but all to do with "memorize random terms no one gives a fuck about".
But sadly that's the kind of job interview you will experience in the field. Memorizing or small tricks (there was a discussion about solving problems with bit shifting some pages back).

Ideally skip those jobs (but since the job field is a battleground you have to prepare for that kind of stuff, especially if you need a 1st job!).

My advice would be: Look at what the company is doing. If you applied to a medical visualization company it might be useful to review how x-rays are working
Security company? Review some of their basic stuff (euclidean algorithm? (my NetSec is bad))

I felt like I could always steer the interview into a direction which would help my strengths. If the interviewer doesnt react - he's an idiot for not realizing that he has someone in front of him who knows the basics of the field (!) and not just generic stuff every idiot can learn. Also keep in mind that OTHER random idiots who just memorize shit could get past such a screening process (read: your coworkers will suck!).
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
Last Edited: 2013-11-01 23:16:00
November 01 2013 22:37 GMT
#7673
On November 02 2013 07:18 DeltaX wrote:
Maybe it takes degrees? Only thing i can think of tbh.


Divide the number by 6, thats the minute offset.+ Show Spoiler +
If you're really cheeky, you're function can just detect "90", "450", and "-90" and return the expected output. It fits the specs. Only answer this way if applying to a defense contractor =D
Any sufficiently advanced technology is indistinguishable from magic
Chocolate
Profile Blog Joined December 2010
United States2350 Posts
Last Edited: 2013-11-01 22:48:49
November 01 2013 22:48 GMT
#7674
On November 02 2013 07:37 RoyGBiv_13 wrote:
Show nested quote +
On November 02 2013 07:18 DeltaX wrote:
Maybe it takes degrees? Only thing i can think of tbh.


Divide the number by 6, thats the minute offset.

Yeah I was thinking that myself, but honestly that makes little sense. Why would you make the input in terms of 10 seconds each? Weird.

Anyway, as someone who has never actually interviewed for a programming job before I must say that having to do such a problem for a job seems almost too good to be true.
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
November 01 2013 22:59 GMT
#7675
Most interview "problems" aren't about creating a solution, but writing code and having a thought process that the interviewer can evaluate.

Just because you can answer the problem doesn't mean you'll get the job. It just means that everything on your resume isn't fluff.
Average means I'm better than half of you.
WoolySheep
Profile Blog Joined October 2010
Canada82 Posts
Last Edited: 2013-11-01 23:00:42
November 01 2013 22:59 GMT
#7676
On November 02 2013 04:55 autechr3 wrote:
Show nested quote +
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


I'll share the problem who's correct solution got me my job:

Write a function that takes in any integer and displays the time as a string. Think standard wall clock that only has a minute hand.

+ Show Spoiler +
Input: 90
Output: 12:15

+ Show Spoiler +
Input: 450
Output: 1:15

+ Show Spoiler +
Input: -90
Output: 11:45




every 360 is one hour, 0 = 12:00.

outPutTime(int num) {

int hours = num / 360;
int min = (num - hours*360) / 6;

hours %= 12;
if (hours == 0 ) {
hours = 12;
}

print(hours + ":" + min);
}


Something like that?
Zocat
Profile Joined April 2010
Germany2229 Posts
Last Edited: 2013-11-01 23:17:05
November 01 2013 23:07 GMT
#7677
On November 02 2013 07:59 WolfintheSheep wrote:
Most interview "problems" aren't about creating a solution, but writing code and having a thought process that the interviewer can evaluate.

Just because you can answer the problem doesn't mean you'll get the job. It just means that everything on your resume isn't fluff.


Yeah definitely (my post might've been a bit harsh).

If there's nothing else the interviewer can evaluate - be prepare those nonsense questions.
If you can provide other stuff (specific core knowledge in a field) and hint at it a good interviewer will ask you stuff about that topic. If he doesnt - he sucks (and yes, you should provide that as feedback to his company (but dont do this as a guy fresh from university)).

On November 02 2013 07:59 WoolySheep wrote:
Show nested quote +
On November 02 2013 04:55 autechr3 wrote:
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


I'll share the problem who's correct solution got me my job:

Write a function that takes in any integer and displays the time as a string. Think standard wall clock that only has a minute hand.

+ Show Spoiler +
Input: 90
Output: 12:15

+ Show Spoiler +
Input: 450
Output: 1:15

+ Show Spoiler +
Input: -90
Output: 11:45




every 360 is one hour, 0 = 12:00.

outPutTime(int num) {

int hours = num / 360;
int min = (num - hours*360) / 6;

hours %= 12;
if (hours == 0 ) {
hours = 12;
}

print(hours + ":" + min);
}


Something like that?


Define your language.
You do hours = num/360 and then mod 12 it.
The given example shows num can be negative (so hours can be neg).

Modulus for neg. numbers isnt clearly defined (math pov afaik).
It's down to the programming language how it's implemented.
http://www.yourdailygeekery.com/2011/06/28/modulo-of-negative-numbers.html

Actually: I didnt check if your example gives correct output. It's definitely possible Just wanted to mention: be careful in what language you do mod.
Housemd
Profile Joined March 2010
United States1407 Posts
November 01 2013 23:10 GMT
#7678
Junior In high school here. Taking AP Computer Science and just discovered this thread. Expect a lot of posting from me, lol.
Fantasy is a beast
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
November 01 2013 23:23 GMT
#7679
On November 02 2013 08:07 Zocat wrote:
Show nested quote +
On November 02 2013 07:59 WolfintheSheep wrote:
Most interview "problems" aren't about creating a solution, but writing code and having a thought process that the interviewer can evaluate.

Just because you can answer the problem doesn't mean you'll get the job. It just means that everything on your resume isn't fluff.


Yeah definitely (my post might've been a bit harsh).

If there's nothing else the interviewer can evaluate - be prepare those nonsense questions.
If you can provide other stuff (specific core knowledge in a field) and hint at it a good interviewer will ask you stuff about that topic. If he doesnt - he sucks (and yes, you should provide that as feedback to his company (but dont do this as a guy fresh from university)).

Show nested quote +
On November 02 2013 07:59 WoolySheep wrote:
On November 02 2013 04:55 autechr3 wrote:
On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


I'll share the problem who's correct solution got me my job:

Write a function that takes in any integer and displays the time as a string. Think standard wall clock that only has a minute hand.

+ Show Spoiler +
Input: 90
Output: 12:15

+ Show Spoiler +
Input: 450
Output: 1:15

+ Show Spoiler +
Input: -90
Output: 11:45




every 360 is one hour, 0 = 12:00.

outPutTime(int num) {

int hours = num / 360;
int min = (num - hours*360) / 6;

hours %= 12;
if (hours == 0 ) {
hours = 12;
}

print(hours + ":" + min);
}


Something like that?


Define your language.
You do hours = num/360 and then mod 12 it.
The given example shows num can be negative (so hours can be neg).

Modulus for neg. numbers isnt clearly defined (math pov afaik).
It's down to the programming language how it's implemented.
http://www.yourdailygeekery.com/2011/06/28/modulo-of-negative-numbers.html

Actually: I didnt check if your example gives correct output. It's definitely possible Just wanted to mention: be careful in what language you do mod.



Dear god, why would any language output 12 for -1 % 13?

The code looks good enough to me. In an Interview, I might point out that you have hours represent two different "hours", the total number of hours elapsed, and the time to display in hours, then see how you fix it.

If you went back and added in hoursElapsed and hoursDisplayed, I might punish you, minorly. If you went back and added a comment without changing any code, that would be passing. If you went back and removed the hours%=12 line, adding it to the original calculation, then removed the reference to hours in the minute calculation, you would receive the highest grade.

You're going to make mistakes, especially in seemingly easy interview questions. How you handle a mistake is just as important as if you got the code right the first time.
Any sufficiently advanced technology is indistinguishable from magic
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-11-01 23:41:22
November 01 2013 23:40 GMT
#7680
On November 02 2013 07:36 Zocat wrote:
Standard job interview questions suck.
Ideally you would avoid jobs which ask those standard questions.

Show nested quote +
On November 01 2013 20:40 sluggaslamoo wrote:+ Show Spoiler +

On November 01 2013 20:27 icystorage wrote:
i have my first job interview in a week. It also includes an exam and I just know it's about problem solving in stuff. It's so general that i don't know what to study. Any tips? =/ i've been brushing up on my data structures.


Off the top of my head.

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

What is the difference between overloading and overriding?

Design using UML how you would implement a rectangle, triangle, and circle class.

What is the difference between a Set, Array, Collection, Hash?

http://codility.com/c/intro/demoV33ZXX-KF8

http://projecteuler.net/

Here's a quiz I prepared earlier
+ Show Spoiler +

General

1. What is functional decomposition?

2. Name 2 major forms of abstraction

3. What is an expression?

4. Name 3 different programming paradigms

5. What is the main difference between structured and procedural programming?

6. What is Control Flow?

7. What is a Side-Effect?


Object Oriented Specific

1. Briefly describe the thought process required in OOP.

2. Name 4 principles of OOP.

3. How can Generalisation be an abstraction?

4. What OOP concept can used to Generalise objects?

5. Name 2 forms of polymorphism.

6. Name 3 things an object can do.

7. Name 3 different design patterns.

8. What is a classification and how does it relate to programming?


Answers
+ Show Spoiler +

General

1. What is functional decomposition?
One of the fundamentals of programming where problems are broken down into their simplest form and one tries to find ways or methods of dealing with each small problem one step at a time. When these problems are solved, one can re-use these methods to handle an even bigger problem.

2. Name the 2 major forms of abstraction
Functional abstraction
Data abstraction

3. What is an expression?
An expression is any unit of code that when combined will reveal itself in the form of a value.

4. Name 3 different programming paradigms
[Most obvious ones]
Procedural
Object-Oriented
Functional
(There are at least 100 more)

5. What is the main difference between structured and procedural programming?
Structured programming abolishes the use of the 'goto' statement that altered the step-by-step process of going through code, as well as only having a single point of entry and exit in a subroutine. A programmer now would only have to think in terms of 'sequence', 'selection', 'repetition' without having to even consider an unsuspecting jump, exit, or entry point in the code, allowing programmers to make better assumptions about someone else's code or even their own code.

6. What is Control Flow?
Used to refer to the order in which statements are called.

7. What is a Side-Effect?
When an interaction with a piece of data affects the behaviour of other operations which rely upon it.

Object Oriented Programming

1. Briefly describe the thought process required in OOP
We must see our program in terms of objects and the role they play in a particular problem domain.

2. Name the 4 core principles of OOP.
Abstraction (or Classification)
Encapsulation
Inheritance
Polymorphism

3. How can Generalisation be an abstraction?
An object can be referred to and grouped as a part of a family of related concepts or roles.

4. What OOP concept can used to Generalise objects?
Inheritance

5. Name 2 forms of polymorphism.
Universal
Parametric
Inclusion
Subtyping
Ad-Hoc
Coercion
Overloading

6. Name 3 things an object can do.
Do things (methods)
Know things (fields)
Collaborate
Perform services
Perform operations
Many others

7. Name 3 different design patterns.
Double Dispatch
Composite
Factory
(Atleast 100 to choose from)

8. What is a classification and how does it relate to OOP?
Classification refers to the category or taxonomy of an object. The idea of object classification is to organise elements or concepts into particular groups, roles, responsibilities, etc. In programming this is called a class, we can use classes to represent these elements as code.


You have a week so I wouldn't bother going through anything difficult, you will just suffer from information overload.


Nothing beats pure experience and just immersing yourself in programming. Just keep doing what you are doing I'd say.


Singling you out (sorry!)
Those questions have nothing to do with "experience" but all to do with "memorize random terms no one gives a fuck about".
But sadly that's the kind of job interview you will experience in the field. Memorizing or small tricks (there was a discussion about solving problems with bit shifting some pages back).

Ideally skip those jobs (but since the job field is a battleground you have to prepare for that kind of stuff, especially if you need a 1st job!).

My advice would be: Look at what the company is doing. If you applied to a medical visualization company it might be useful to review how x-rays are working
Security company? Review some of their basic stuff (euclidean algorithm? (my NetSec is bad))

I felt like I could always steer the interview into a direction which would help my strengths. If the interviewer doesnt react - he's an idiot for not realizing that he has someone in front of him who knows the basics of the field (!) and not just generic stuff every idiot can learn. Also keep in mind that OTHER random idiots who just memorize shit could get past such a screening process (read: your coworkers will suck!).


I agree with you, but that's just the nature of the beast unfortunately. Even top tier companies will ask questions like this, and I do see some purpose in asking them, although I wouldn't treat it as the be all and end all. Ideally if you knew enough about programming overall you should be able to answer these questions regardless.

3 of those questions I have been asked in an interview at Lonely Planet. The shape one, overloading/overriding, and the data-structure one.

The overloading versus overriding one I almost messed up just due to nerves, I was eventually able to answer it succinctly but after I paused for a long time initially they put even more pressure on me saying its a core fundamental and I should know it (considering I answered all the others so easily), if there wasn't so much on the line I would have been able to answer it immediately too.

Apparently I was the only one that was able to answer all questions out of the field though.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
Prev 1 382 383 384 385 386 1032 Next
Please log in or register to reply.
Live Events Refresh
IntoTheTV X SOOP
11:00
Replaycast Group C
PiGosaur Cup
09:30
#105
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 106
StarCraft: Brood War
Rain 3382
Leta 562
GuemChi 548
Mong 258
Shine 137
Dewaltoss 65
ZergMaN 63
Hyuk 43
910 33
NotJumperer 12
[ Show more ]
Icarus 8
Other Games
summit1g9393
WinterStarcraft468
Happy275
Livibee155
Sick71
Organizations
Other Games
gamesdonequick875
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• Azhi_Dahaki56
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2344
League of Legends
• Rush1290
• Stunt617
Other Games
• Shiphtur535
Upcoming Events
The PondCast
2h 58m
Kung Fu Cup
3h 58m
IntoTheTV X SOOP
1d 3h
SHIN vs GuMiho
Clem vs Classic
OSC
1d 14h
WardiTV Invitational
2 days
GSL
2 days
Epic.LAN
2 days
Replay Cast
2 days
Sparkling Tuna Cup
3 days
Epic.LAN
3 days
[ Show More ]
AI Arena Tournament
3 days
Yamato Cup
4 days
Map Test Tournament
4 days
WardiTV Weekly
5 days
Replay Cast
5 days
Rogue vs Classic
Patches Events
6 days
PiGosaur Cup
6 days
Liquipedia Results

Completed

Proleague 2026-10-27
Blizzard Classic Cup 2026
HCC Season 3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
PGL Masters Bucharest 2026
Stake Ranked Episode 5
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026

Upcoming

IPSL Winter 2026-27
SC4ALL II: Brood War
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
eXTREMESLAND 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.