background preloader

Programming

Facebook Twitter

Effectively managing memory at Gmail scale. Introduction While JavaScript employs garbage collection for automatic memory management, it is not a substitute for effective memory management in applications.

Effectively managing memory at Gmail scale

JavaScript applications suffer from the same memory related problems that native applications do, such as memory leaks and bloat, yet they must also deal with garbage collection pauses. Large-scale applications like Gmail encounter the same problems facing your smaller applications. Read on to learn how the Gmail team used Chrome DevTools to identify, isolate, and fix their memory problems. Google I/O 2013 Session We presented this material at Google I/O 2013.

Gmail, we have a problem... The Gmail team was facing a serious problem. Memory Management Basics Before you can effectively manage memory in JavaScript you must understand the fundamentals. Primitive Types JavaScript has three primitive types: Number (e.g. 4, 3.14159) Boolean (true or false) String (“Hello World”) Big-O Algorithm Complexity Cheat Sheet. 50 Coolest Gifts for Guys Under $25. You don’t have to spend a lot to get a cool gift for your guy friends and family members.

50 Coolest Gifts for Guys Under $25

In fact, some of the coolest gifts you can get him are under $25. No matter what his likes and interests are, you can find the perfect gift for any occasion without breaking the bank. Whiskey Stones A set of whiskey stones makes an elegant gift for any guy who enjoys the occasional nightcap. Nine grey whiskey stones are made from natural soapstone, making them as elegant as they are functional. LifeStraw Personal Water Purifier When camping, hiking, kayaking canoeing, and embarking on all manner of outdoor sports, having access to clean water is a constant concern. Stanley Classic Flask Whether he’s on a camping trip or enjoying a celebration, he can sneak a drink with the rugged Stanley Classic Flask. Black Playing Cards Pick Punch You can never have too many guitar picks, and with the pick punch, you’ll never have to worry about running out.

Scratch Map. How to Hunt Elephants. MATHEMATICIANS hunt elephants by going to Africa, throwing out everything that is not an elephant, and catching one of whatever is left.

How to Hunt Elephants

EXPERIENCED MATHEMATICIANS will attempt to prove the existence of at least one unique elephant before proceeding to step 1 as a subordinate exercise. PROFESSORS OF MATHEMATICS will prove the existence of at least one unique elephant and then leave the detection and capture of an actual elephant as an exercise for their graduate students. COMPUTER SCIENTISTS hunt elephants by exercising Algorithm A: Go to Africa. Start at the Cape of Good hope. EXPERIENCED COMPUTER PROGRAMMERS modify Algorithm A by placing a known elephant in Cairo to ensure that the algorithm will terminate.

ASSEMBLY LANGUAGE PROGRAMMERS prefer to execute Algorithm A on their hands and knees. DATABASE ADMINISTRATORS do not need to go out and capture elephants when they can retrieve them simply with an ad hoc query: STATISTICIANS hunt the first animal they see N times and call it an elephant. The Evolution of a Programmer. High School/Jr.High First year in College program Hello(input, output) begin writeln('Hello World') end.

The Evolution of a Programmer

Senior year in College. Humor - How to Shoot Yourself In the Foot Using Any Programming Language. The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you're currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas. 370 JCL You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.

Ada After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream, and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type. APL You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters. What every computer science major should know. Portfolio versus resume Having emerged from engineering and mathematics, computer science programs take a resume-based approach to hiring off their graduates.

What every computer science major should know

A resume says nothing of a programmer's ability. Every computer science major should build a portfolio. A portfolio could be as simple as a personal blog, with a post for each project or accomplishment. A better portfolio would include per-project pages, and publicly browsable code (hosted perhaps on github or Google code). Signs that you're a bad programmer - Software Engineering Tips. Why was this written?

Signs that you're a bad programmer - Software Engineering Tips

Most of these faults were discovered the hard way by the author himself, either because he committed them himself or saw them in the work of others. This paper is not meant for grading programmers, it was intended to be read by programmers who trust their ability to judge when something is a sign of bad practice, and when it's a consequence of special circumstances. This paper was written to force its author to think, and published because he thinks you lot would probably get a kick out of it, too. 1. Inability to reason about code Reasoning about code means being able to follow the execution path ("running the program in your head") while knowing what the goal of the code is.

Symptoms. Hack This Site! GitHub.

Resources

Blogs.