• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Removed 2 lines of code in 2 days

 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, we have a project that uses "dynamic" tables. Basically, for reasons lost in mist of time, every time a user logs on, they create a table to do transaction on the user's records. At some point, they delete those tables. They had used hibernate to map those table into Java. Now, since the table name changes, they had customized the Hibernate persister to change the table name of the sql

Trouble was we upgraded hibernate now, and the cusomization broke. So, I spend almost 2 days digging through hibernate code, and come up with a solution that works with upgraded hibernate. I also reduced the number of lines of code by 2

-2 LOC in 2 days. How's that for productivity?!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does that mean you will get a negative salary this month?
 
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You say that as if it's unusual.
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my experience, most times people are using dynamic SQL, they really shouldn't. So you can usually remove a heck of a lot more than 2 lines of code and improve productivity at the same time.

Keep cutting out the dead wood!
 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You say that as if it's unusual.



Well I usually get to go debug into third party libraries about once a year or so. So, it's unusual enough for me to feel good about it when I get something done.


Jesper de Jong wrote:Does that mean you will get a negative salary this month?



Hope not!

I figured since I'm doing negative work very slowly anyways, I might as well goof off all afternoon.
 
author & internet detective
Posts: 41146
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And this is why productivity != lines of code .
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Labour charges for deleting 2 lines - $2.00
Knowing which 2 lines to delete - $99,998.00
 
chris webster
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Karthik Shiraly wrote:Labour charges for deleting 2 lines - $2.00
Knowing which 2 lines to delete - $99,998.00

Now that's what I call productivity!
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Classic story: -2000 Lines Of Code
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayesh A Lalwani wrote:-2 LOC in 2 days. How's that for productivity?!


I think that qualifies you to work at Microsoft.
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

J. Kevin Robbins wrote:

Jayesh A Lalwani wrote:-2 LOC in 2 days. How's that for productivity?!


I think that qualifies you to work at Microsoft.


(Un?)fortunately, after recent developments like open sourcing .NET and giving away Office for free on mobiles, Microsoft is no longer the Borg. We devs will have to quickly find another punching bag.
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Karthik's comment

I remember a time when we had a bug in our code - it was thread related and for a few weeks it ping-ponged to different developers. After it came to me, I had to put almost 3 weeks fixing it. The major pain was - it was not easily reproducible (thread issues - you know )

The actual fix was adding one line.

It was around 18 months ago and only good thing is - it never broke again (at least that scenario was never reproduced again)

Fortunately where I work, we don't count productivity in terms of LOC
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic