Could you give examples of programs that require more RAM and programs that require more CPU power?

Could you give examples of programs that require more RAM and programs that require more CPU power? by Joey Kim

Answer by Joey Kim:

More RAM:

int a[1000000000000000000000000000]; // congratulations, you're out of RAM

More CPU:

for(;;) { fork(); } // a fork bomb! run!

Browsers can use a lot of memory if you go onto “rich web applications”. If you run that above code from a JavaScript console, you’ve got yourself a program that uses a lot of CPU.

Editors such as Eclipse and Aptana Studio use a lot of memory. On the other hand, Notepad (the one that comes with Windows) uses an insanely small amount of memory.

Emulators, such as Bochs or QEMU use a lot of CPU, since you’re converting instructions from one form to another.

Google Chrome uses less memory than Firefox and Internet Explorer, but Firefox uses less CPU.

Hope this helps!

EDIT: Peter Ho said that “for(;;)” takes up only one core. He suggested a fork bomb. Edited to reflect his suggestion. Thanks, Peter!

Could you give examples of programs that require more RAM and programs that require more CPU power?

How efficient is the 7-minute workout?

How efficient is the 7-minute workout? by @TimErnstFitness

Answer by Tim Ernst:

7–8 minute workouts can be VERY effective and POWERFUL for fat loss. Here’s one that will make your muscles BURN with Lactic Acid!

Short but intense 8 minute body weight circuits are great when you do not have a lot of time for the gym.

One thing that they do is increase ‘lactic acid

Lactic acid is a VERY powerful chemical released in the body that actually boosts testosterone and growth hormone.

The world's best athletes stay competitive by interval training. Intense exercise generates big lactate loads, and the body adapts by building up mitochondria to clear lactic acid quickly. If you use it up, it doesn't accumulate.

Lactic acid is a white milky substance that creeps into your muscles during intense exercise.

Here’s how lactic acid works in the body…

Special cells called “Leydig” use lactic acid to suck up cholesterol and convert it into testosterone.

In turn this lowers your free cholesterol count and releases human growth hormone which in turn raids your fat cells for emergency fuel to strip away fat from trouble spot areas like your belly.

When lactate triggers in your muscles… You will feel that intense “burn” and the more lactic acid you coax from your muscles… the more powerful the benefits.

And Get This…

Without lactic acid… your body refuses to do any of the exciting things such as producing more testosterone, growth hormone and energy.

Here is an intense 8 minute workout that will do ALL the things described above!

How efficient is the 7-minute workout?

Which laptop do programmers use?

Which laptop do programmers use? by Daniel Turan

Answer by Daniel Turan:

I had to choose between Surface Book and Surface Pro 4 (both Intel Core i7, 16GB RAM):

The larger has dedicated GPU which I personally don’t need, so I have chosen the Surface Pro 4.

Here is how my desk at the office curently looks like:

I need to get rid of few cables, but important is, that I need to disconnect only single cable from Surface and I can go. Slightly better than my colleague’s laptop, isn’t it? 🙂

When it comes to performance it’s amazing – Visual Studio starts almost instantly, I have no problems running few instances of Visual Studio with really large solutions concurrently with Photoshop and all major browsers open. However, the active cooler is a price for the performance. It’s little bit noisier when CPU usage is 50% or higher for longer time. If this was a problem then Surface Book would a better choice.

I really do blame Apple for ignoring touch and pen on their laptops and desktops. Among others I develop UIs – either websites or mobile apps. Those UIs must be touch friendly and I need touch screen and pen on my development machine. I really don’t want to carry MacBook, iPad Pro and iPhone and possibly another Android smartphone with me and switch cables every time I need to debug another device. Not even sure if it is possible.

Once you get used to touchscreen everywhere you become adicted. I guarantee you that.

As a complementary input methods it touch&pen useful everywhere.
You can imagine how annoying is to drag&drop those workitems on virtual scrum board using trackpad?

How much easier is it using touchscreen?

How much easier is to draw something everytime you open MS Paint or OneNote when you can use pen instead of mouse?

Costs (at
Surface Pro 4 i7 256GB, 16GB RAM: $1619
Type Cover: $104 – this should really be included, unfortunately it isn’t. But this keyboard is surprisingly amazing. Trackpad is as good at the one on MacBook.
Surface Dock: $109

alternatively, You can get bundled Surface Pro 4 i5 256GB, 8GB RAM + Type Cover for $999.

Which laptop do programmers use?

If you could condense your BS degree into 10 books or less, what would they be?

If you could condense your BS degree into 10 books or less, what would they be? by Gitansh Kataria

Answer by Gitansh Kataria:

Sure. Electronics Engineering. I’ll also add the links to the really great online courses for anyone who is looking to learn.

  1. A book on C by Ira Pohl and Al Kelly – I really like this book for learning everything C. There are a few other good options, like The C Programming Language by Brian W. Kernighan, Dennis M. Ritchie, mentioned in another answer.

    C is quite useful while designing and implementing embedded systems, and understanding the concepts of memory management. Learning about Object Oriented Programming concepts will enable us to switch easily to C++/Java later if required. Also, a little bit of physics, and we’re good to go.

    Here’s Harvard’s online course : Introduction to Computer Science

  2. Introduction to Algorithms by Thomas H. Cormen – Any degree, any major, if you’re serious about programming, this book is indispensable.
  3. Foundations of Digital and Analog Electronic Circuits by Agarwal and Lang – I fell in love with electronics after I watched these video lectures : Circuits and Electronics on MIT OCW. The course follows this book, but the book is not necessary to buy. A more recent version of the online course : Circuits and Electronics 1: Basic Circuit Analysis and its sequels on edx.
  4. Introduction to Electrodynamics by David J. Griffiths – A little bit of physics needed to handle any electromagnetics courses you may want to take up further (Antenna Theory and Design, Photonics and Optics, Acoustics, Transformer Design). From this book we just need to learn the basics of Maxwell’s laws and how to handle the associated math. (Gradients, Curl, Divergence, and other such stuff)
  5. Digital Design by Morris Mano – Learn about K-maps, Combinational and Sequential logic, State Space approach. This great online course : Computation Structures – Part 1: Digital Circuits can supplement the book. But reading the text is a must for a thorough understanding of concepts.
  6. Signals and Systems by Alan V. Oppenheim : Learn about time and frequency domains, transforms (Z transform, Laplace Transform, Fourier Transform). We can go a step further and read about filter design if you’re interested in Signal Processing (Speech/Audio/Video/Image/EEG/ECG). Another great alternative to this book is Digital Signal Processing : Principles, Algorithms and Applications by Manolakis and Proakis.

    You can find video lectures by Oppenheim on Youtube. ( Not posting the link)
    A more recent version of the course on MIT OCW : Signals and Systems

  7. Modern Control Engineering by Katsuhiko Ogata – Learn to model Physical Systems into differential equations, solve differential equations by converting them to Laplace domain, draw and interpret Bode Plots, design simple control loops (PID and variants).
    Two online courses by MIT :
    Introduction to Control System Design – A First Look
    Introduction to State Space Control
  8. Microelectronics Circuit Analysis and Design by Donald Neamen – Our friends from other branches used to joke about Electronics students having nothing else to read but Neamen, as our college required us to use this book for 3 out of the first 4 semesters. This shows the importance of this book and a lot of very important concepts are to be learnt from it. Focus on designing circuits involving Diodes, BJTs, MOSFETs and Op Amps. This book uses basic concepts of circuit analysis from (3).

    The last two are for the learners :

  9. Embedded Systems : I’m not aware of any great book for this, but here are two online courses from UT, Austin, which are amazing :
    Embedded Systems – Shape The World
    Real-Time Bluetooth Networks – Shape the World

    These require basic familiarity with digital electronics and programming in C.

  10. Datasheets : Not a book. But finally, learn to read and interpret datasheets of electronic components. Datasheets can be found on the internet by googling the name of the device followed by ‘datasheet’ Know how to quickly find the information you need about a device from its datasheet. Know the physical limits of the devices you’re using. Buy some components and design circuits on a breadboard using some common ICs (LM555, LM741, CD4017 and others), transistors (IRF540, BC547, TIP142, BC557, TIP147), diodes (1N4007), LEDs, buzzers, capacitors and resistors.

If you could condense your BS degree into 10 books or less, what would they be?

If you could condense your BS degree into 10 books or less, what would they be?

If you could condense your BS degree into 10 books or less, what would they be? by Artur Mariano

Answer by Artur Mariano:

Computer Science.

  1. The C programming language: The C Programming Language by Brian W. Kernighan, Dennis M. Ritchie. Programming forms the back bone of any Computer Science degree. If you know C, you will instantly be able to program in any imperative language.
  2. Operating systems: Operating System Concepts by Abraham Silberschatz, Peter B. Galvin, Greg Gagne. One of my favorite books ever! I simply love this book. You’ll learn everything about Operating Systems, namely memory management, process handling, etc.
  3. Algorithms: Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest. It builds up on the knowledge you have on C. This covers everything about data structures, algorithms and complexity.
  4. Networks: Computer Networks: A Systems Approach by Larry L. Peterson, Bruce S. Davie. Networks were really not my thing, but this book will teach you all about it. Protocols and what not are all explained here.
  5. Distributed Systems: Distributed Systems: Concepts and Design by George Coulouris, Jean Dollimore, Tim Kindberg, Gordon Blair. This topic builds on networks, and it pertains to server/client communication, and systems of loosely coupled systems.
  6. Linear Algebra: Linear Algebra Done Right by Sheldon Axler. I love linear Algebra and it actually forms a cornerstone of many majors in Computer Science (Parallel Computing, for instance).
  7. Databases: Database Systems: Design, Implementation, & Management by Carlos Coronel, Steven Morris. You’ll learn to create Relational Databases that scale. The book walks through performance as well. Many examples in various flavors of SQL. A decent book, for a solid background on databases.
  8. Software Engineering: Software Engineering by Ian Sommerville. If you ever spend money on a book pertaining to Software Engineering, put your chips on this one. Advice: if you want to work for a decent company like Google, read this book even if you don’t need so to pass the subject.
  9. Calculus: Calculus: Ron Larson, Bruce H. Edwards If your degree has an old-school program, expect a lot of Calculus. I had 4 different subjects related to Calculus and all I used was this book.
  10. Physics: Fundamentals of Physics Extended by David Halliday, Robert Resnick, Jearl Walker. Everything you need to know about Physics, as far as an Engineering degree goes. Not my favorite topic though.

In my personal website, I do recommend various books on Computer Science, if you are interested: Artur Mariano – Home

If you could condense your BS degree into 10 books or less, what would they be?

If you could condense your BS degree into 10 books or less, what would they be?

If you could condense your BS degree into 10 books or less, what would they be? by Carlos Matias La Borde

Answer by Carlos Matias La Borde:


The useful topics that there are textbooks on:

  • OOP with Java
  • Algorithms & Data Structures
  • Discrete Math
  • Software Engineering
  • Artificial Intelligence

Well, what do you know… I got it done in 5.

The specific textbooks don’t really matter; none of them jumped out at me as brilliant, and I honestly can’t remember any of the names. Though for Algorithms it’s pretty obvious to get a copy of CLRS if you can.

Something else worth studying: Stats I and II. But I’m not sure if a book would cut it. I’d recommend just about anyone who can manage it to take stats.

Extra bonus: How to Solve It by Pólya. Generally useful.

(There was plenty of other stuff like OS concepts etc. but I got the most applicable stuff out of the above.)

If you could condense your BS degree into 10 books or less, what would they be?

Why do analysts on Wall Street use excel?

Why do analysts on Wall Street use excel? by John Hwang

Answer by John Hwang:

There are two questions that we need to ask here:

a) Are most analysts on Wall Street capable on coding a solution quicker in python or MatLab versus doing something on Excel?

b) Do most problems in finance require a programmatic solution?

I have a CS degree from Stanford, so when I arrived at GS in 2006, I had the same question as you. And here's what I realized.

#1. Most Wall Street analysts are not programmers.

Most of them come from non-CS backgrounds, and had limited exposure to programming classes.  Thus, there's a tremendous mental barrier for them to program a solution than using a GUI based tool like Excel.

#2. Most finance programs are "micro-data" programs that easily fit in Excel.

Unless you are at a quantitative investing fund where you need to backtest and optimize a gazillion strategies, you will probably not deal with datasets exceeding 200K rows.

Think about it. There's <10,000 tickers in the U.S. And for any given company, there's maybe 500~ indicators & metrics worth looking at.

So if your job is to create a basic revenue model for a specific industry or a basket, you  probably won't be dealing with more than 50,000 rows of data.

Not only that, all the data is clean and structured, so you don't need to do complex data munging.

Thus, you take out the needs for 1) big storage, and 2) data munging, and you remove the biggest reasons why anyone should feel compelled to program in Python versus Excel.

If you liked my writing, follow me for more in depth finance posts.

Why do analysts on Wall Street use excel?