Questions tagged [reading-code]

17 questions
24
votes
7 answers

As a software engineer, how important is it to read other's code?

I am a budding software engineer (now a sophomore, major in CS) and I really struggle to understand other people's programs. I want to know if this skill (or lack of it) can be a handicap for me, and if yes, then how can I develop it?
James Bond
  • 386
  • 3
  • 9
14
votes
5 answers

How should someone used to FP thinking read imperative code?

I graduated from university about five months ago, and have been working in a local startup for past four months. While at university, I studied Haskell, F# etc on my own. We were taught Java at the university, but I was exposed to functional…
12
votes
9 answers

How to handle a 'bad code' interview?

A 'bad code' interview is one where the interviewee is shown a snippet of 'bad code' and asked to correct it or point out things that are wrong with it. I have trouble with these interviews because it takes me some time to read the code, figure out…
quanticle
  • 955
  • 7
  • 14
9
votes
2 answers

Where should I start reading AngularJS's source code?

After reading this article I realized that I really didn't read any "serious" source code during my 3-years as a professional developer. Recently I started a new web-project which makes heavy use of AngularJS, so I decided to start my reading - or,…
Abaco
  • 211
  • 2
  • 5
6
votes
2 answers

Start reading Ruby (on Rails) code

I'm an experienced developer which quite some experience in meta programming. I just found my way to Ruby and want to understand more of Rails (and related) project internals. Even if I understand the high level concepts, it's hard to get an…
Achim
  • 179
  • 6
6
votes
2 answers

How to read Scala code with lots of implicits?

Consider the following code fragment (adapted from https://stackoverflow.com/a/12265946/1333025): // Using scalaz 6 import scalaz._, Scalaz._ object Example extends App { case class Container(i: Int) def compute(s: String): State[Container,…
Petr
  • 5,507
  • 3
  • 29
  • 46
5
votes
2 answers

What can I infer from someones code when they use direct initialization with Curly Braces as opposed to Parenthese?

Up until now, I have been initializing most of my variables as such: const QString foo("bar"); Which from my newfound understanding, is known as direct initialization. (http://en.cppreference.com/w/cpp/language/direct_initialization) I was looking…
Anon
  • 3,565
  • 3
  • 27
  • 45
5
votes
5 answers

What is the best way to understand code in a project with null documentation?

It is our first game and we are a start-up. We had a programmer who suddenly is seeming to be a dead weight. Though we knew him personally we thought that he was as motivated as we are and hence I never looked for a code review or documentation. Now…
Filip
  • 61
  • 5
4
votes
2 answers

How can I know when a paper is too hard for me to be able to implement their code and/or understand their math - within a given deadline?

I've been assigned to explore implementing (along with modifications, so understanding it is a must) this algorithm for the 'Redistricting Problem': https://dl.acm.org/doi/pdf/10.1145/3274895.3274979 . They have code linked in the paper, in C++ and…
4
votes
2 answers

Advice for volunteer developers learning large codebases

Working in an open source project has the result that sometimes developers with no experience in the codebase attempt to "learn the code" on their own. There is a reccurring trap I've seen, where new developers try to: understand everything before…
ideasman42
  • 873
  • 6
  • 18
3
votes
0 answers

Best practices for understanding/resurrecting old technical code?

Recently, I've been in a few situations where I needed to quickly come up to speed on old code and fix it sufficiently for people to be able to use it again. The code I've worked on tends to have the usual issues (no documentation, no tests, etc.),…
ace
  • 41
  • 2
2
votes
3 answers

Difficulties in reading code

I don't have more than 6 months of experience and I am a little lazy . I work on Android platform . I have very good skills in understanding what is happening in general . The problem is that I don't have the experience to read and understand…
0
votes
1 answer

What information should one infer from a class header that marks its constructor explicit?

If a class is written well, you should be able to gleam all relevant information about the class simply by looking at its header. If one sees that the constructor is marked explicit: What should one assume to be absolutely true about this…
Anon
  • 3,565
  • 3
  • 27
  • 45
0
votes
2 answers

What are some good approaches for reading Javscript code?

I'm looking for suggestions on how to read large Javascript codebases, for example, of a framework. For example, let's say P5js, but this applies to any large framework (i.e like AngularJS, Ember, etc) My goal is to be able to look through a…
0
votes
2 answers

What are best practices to read high level undocumented and uncommented code?

There are some opensource projects, that have classes and classes without any significant explanation about what the class does and or why is that class needed. For example, classes in the CppEditor plugin for QtCreator. What are the best practices…
Adrián Pérez
  • 181
  • 1
  • 5
1
2