+ 11

How many lines of code were you able to reduce?

Have you ever achieved a huge code reduction? If so, how many lines of code were you able to reduce? What kind of project was it? And what programming language did you use originally and after to rebuild it? ☺ I read Linkedin was able to reduce its core mobile services code from 60,000 lines (using Ruby) to only 2,000 (using NodeJS). You can read more about it here: http://queue.acm.org/detail.cfm?id=2567673

5th May 2017, 4:11 AM
Pao
Pao - avatar
8 ответов
+ 10
Once I made a Ruby dice, It was about 90% original size, Why did I make it complex ಥ_ಥ EDIT: Oh wait my name.
5th May 2017, 4:45 AM
Complex
Complex - avatar
+ 15
@Kamran it is an awesome and sweet short code 🙌👏 My math teacher wasn't so pleased when I found other (shorter) ways, haha. Truth is, there's always room for improvement :) Congrats and thanks a lot for sharing, keep those codes coming 😊!
5th May 2017, 7:56 AM
Pao
Pao - avatar
+ 8
@Paola MB Thanks, :D But I was trained to put my codes into shorter functional ones :D
5th May 2017, 5:11 AM
Complex
Complex - avatar
+ 8
@C0MPL3X yeah 🙌totally support that👌You serve as a great example then 😊
5th May 2017, 5:22 AM
Pao
Pao - avatar
+ 7
@1of3 & @C0MPL3X hahaha wooow 👏 I see dices are a little complicated, nicely done both of you 👌
5th May 2017, 5:10 AM
Pao
Pao - avatar
+ 7
@Paola MB Thanks :D
5th May 2017, 5:22 AM
Complex
Complex - avatar
+ 4
I am a beginner in coding. I am studying C++ now and I have only written a couple of codes. https://code.sololearn.com/c79X9vXZIG5R/?ref=app This is one of them. It was the project for educational purpose. The teacher(I'm studying at the university☺) wrote the original code to explain us how it works. There were some unnecessary lines that I could remove. And variables in the original code had certain values so the output was always the same😂 I made it possible for user to input his own. I also swapped some "if" statements to reduce the time of execution. As a result I reduced the code for about 6-7 lines. There could not be a big reduction because the code itself is tiny😂
5th May 2017, 7:14 AM
Kamran
+ 2
My first little project was a library for rolling dice. I later reimplemented it in Scala. Code was 30% the original size.
5th May 2017, 4:40 AM
1of3
1of3 - avatar