How many lines of code were you able to reduce? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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