Less code to store data in your Android

In Android, what is the shortest/easiest way to just store a simple tuple of connected values, f.ex. Date date, String name, int count? Using SharedPreferences, you could keep an incrementing ID and store the values as editor = context.getSharedPrefe

How do I reduce lines of code in PHP?

I am a web developer and I write code in PHP/Laravel framework. I've been tying to follow best practice for writing code and I know it's a good practice to write 15-20 lines of code in functions and maximum 200 lines of code in Classes. But every tim

Ruby how to add an item to the hash that returns the hash?

I'm trying to be really efficient with # of lines of code so I want to combine the following two lines of code: my_hash["X"] = value my_hash If I take out the second line, then my function returns the wrong thing because it will only return the

Obtain a number of rows for specific varchar in MS SQL

In MS SQL Server 2012 I have a database with a table containing a varchar column that holds some text that might even include line breaks. Basic example: CREATE TABLE Example ( [ID] INT , [Text] VARCHAR(100) ); INSERT INTO Example ([ID], [Text]) VALU

Utility to count the number of lines of code in Python or Bash

Is there a quick and dirty way in either python or bash script, that can recursively descend a directory and count the total number of lines of code? We would like to be able to exclude certain directories though. For example: start at: /apps/project

An easy way to count the lines of code using reflection

I need a (very rough) estimation on the lines of code (none-blank, none-comment) of an .net Assembly (c#). Is there an easy way to do this using reflection? I would prefer a hand-written tool (so I am asking about pointers here...) but I would also s

Eclipse Metrics Plugin for C ++

Does anyone know a good metrics plugin for Eclipse that works with C++ ? I'm looking for lines of code mainly. Thanks.There's the open source Eclipse Metrics plugin, but i personally prefer ProjectCodeMeter which integrates with eclipse as external m

How to present your code to potential buyers?

I'll do a demo of my code to slightly non-technical audience, and I need to show them what I've got in my project (about 15K lines of code). I'm trying to convince them that I've spend time on the project and it's in a good state. These guys planning