Skip to main content

Posts

Programming Language Governance (1)

As software eats the world, the programming languages used to build the software themselves grow and evolve. When new programming languages start out, they are often the product of an individual or a small group of people, though there are several famous examples of top-down programming language design where the PL is designed by committee from the outset (e.g., ALGOL . However, when a PL gets to a certain level of adoption, the inventors sometimes submit the PL to one of the standardization bodies: ISO C++, ANSI C, ANSI FORTRAN, ECMA/ISO C#, and ECMA ECMAScript. Others continue to retain their independent governance bodies (e.g., Python, Java). In either case, the governing bodies specify a process for evolving PLs: Java: Java Specification Requests C++: C++ papers Python: Python Enhancement Proposals Rust: RFCs C#: Language Proposals ECMAScript: ECMAScript Proposals Each of these governance bodies is like a small government. Many have voting
Recent posts

Interview Gotchas

It's a challenge to outperform all the other candidates in a competitive tech job only, but there is hope. You can improve your performance with practice and watching out for these gotchas: Make absolutely sure you are solving the right problem: I ran into this the other day. It is entirely a communication issue. When doing an initial screen over the phone, this problem is compounded. For example, maybe an interviewee is hacking out a function that returns the k highest priced products when the interviewer is expecting the kth highest priced product. One can squander a lot of time due to these misunderstandings. A good interviewer will try to guide you back to the right path, but you can't expect this. Be sure to ask questions. Confirm that the input and output are exactly what you expect. Use examples. Don't ever give an interviewer the impression that you are avoiding writing real code. This is an impression thing. This is a coding interview so you should be expecting

New Format

People have raised the idea of splitting up the group during the session into smaller groups to simultaneously tackle problems. I think the more participation we can get the better. Please, please bring some paper and a pencil to work out problems for next week. I will bring a few example problems. Feel free to PM me on Meetup with problems if you have any that you think we should cover.

Why Heaps?

There seemed to be a bit of confusion in regards to the utility of heaps. Let us recap some of the main distinctions of a heap and where it is typically useful and where it is not. Heaps are foremost a data structure for performing incremental calculations that involve ranking. Implementations of heaps are found as priority queues are found in nearly all programming languages. One practical use of heaps is priority scheduling. Heaps generally speaking aren’t great for one shot computations. For example, using heaps for a one time total sorting isn’t as helpful because it’s worst case running time of O(N log N) is no better than merge sort. If one was looking to sort unrelated arrays of ints, one won’t be able to benefit from heaps. Where heaps shine is if we can maintain the heap property each iteration and not having to redo work for each iteration. Consider the following example, we want to write a function that returns the top 5 most visited websites where for each function call w

Solving Coding Problems, Part 1: Getting Started

Don't get intimidated by coding problems. Despite how daunting they appear, there is rhyme and reason to them. With experience solving and presenting them, you'll get much more comfortable. First, get comfortable with the format of the whiteboard coding interview. I went over this part in a previous post on format of the coding interview . Second, get familiar with the different types of problems which frequently occur in interviews. Coding interview problems are, despite all the bluster, coming from a finite pool. Interviewers may occasionally put their own twist on things, but usually the problems are variations on tried and true problem types. So it is important for you to recognize the popular types of problems and learn the main techniques for solving them cold. Consider the following problem: write a function that takes an integer as input, reverses the bits in that integer, and returns resultant integer. First thing, observe what are the data types involved as in

Binary Trees

Trees Binary trees are widely used data structures. Similar to linked lists, they are inductively defined: a binary tree node is comprised of a value and two child binary tree nodes, left and right. A binary tree can also be empty. The node that a child of no subtree is called the root. Binary trees are most useful in contexts where data has some kind of ordering since one can put the lesser nodes (with respect to a given node) on the left and the greater ones on the right. Binary trees tend to show up quite a bit in interviews because there are a lot of interesting problems you can ask about them. The key concept you need to learn is the many ones one can traverse a binary tree. Tree in programming are more like family trees (without accounting for marriages) in that they grow downward. A diagram that lists your great great grandparent and all descendants would be a good example. Consider the following binary tree: 1 / \ 2 3 / \ \ 4 5 6 The

Code Reviews, Part 1

Why Code Reviews? Code review is a practical and important skill that truly distinguishes the highly experienced engineer. Knowing what are the common pitfalls, where to look for them, and how to understand someone else's code quickly is an invaluable skill to have. It is also a skill that is rarely taught in school. To really ramp up your programming skills, get out there and read other people's code. Reading high quality code is a good learning experience. Occasionally reading poorly written code is also insightful. What are the most common errors and where do you find them? Through code reviews, software engineers can spread knowledge through their teams as well as improve consistency and code quality. For the interviewee, you have to review your own code, so it helps to know what are the things you need to double check. One great way to evaluate a team's culture is to probe and understand their code review practices or lack thereof. Below, I will cover some of the be