Basic Android Lists

  1. Single item - ArrayAdapter

    txtNote = (EditText)findViewById(R.id.txtNote);
    btnAdd = (ImageButton)findViewById(R.id.btnAdd);
    lstNotes = (ListView)findViewById(R.id.lstNotes);
    adapter = new ArrayAdapter(AddNewListOfNotes.this,R.layout.listnotes);
    lstNotes.setAdapter(adapter);
    btnAdd.setOnClickListener(new View.OnClickListener() {
    	public void onClick(View v) {
    		adapter.add(txtNote.getText().toString());
    	}
    });

    http://stackoverflow.com/questions/4645854/add-data-from-edittext-to-listview-in-android

  2. on click listeners
    lstNotes.setOnItemClickListener(new OnItemClickListener(){
    	public void onItemClick(AdapterView parent, View view, int position, long id) {
    		Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
    	}
    });

    http://www.mkyong.com/android/android-listview-example/

  3. single item – array adapter with complex layout – reference id of textview
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:background="#FFFFFF"  >
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
            <EditText
                android:id="@+id/txtNote"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1.06"
                android:ems="10" >
                <requestFocus />
            </EditText>
            <ImageButton
                android:id="@+id/btnAdd"
                android:layout_width="47dp"
                android:layout_height="fill_parent"
                android:src="@drawable/ic_menu_add" />
        </LinearLayout>
        <ListView
            android:id="@+id/lstNotes"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
        </ListView>
    </LinearLayout>
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="horizontal" >
        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ok" />
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" >
            <TextView
                android:id="@+id/txtHeading"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Large Text"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:textColor="#090909" />
            <TextView
                android:id="@+id/txtSubHeading"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Small Text"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="#090909" />
        </LinearLayout>
    </LinearLayout>
    package com.example.helloandroid;
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.AdapterView;
    import android.widget.ArrayAdapter;
    import android.widget.EditText;
    import android.widget.ImageButton;
    import android.widget.TextView;
    import android.widget.Toast;
    import android.widget.ListView;
    import android.widget.AdapterView.OnItemClickListener;
    
    public class AddNewListOfNotes extends Activity {
    	private EditText txtNote;
    	private ImageButton btnAdd;
    	private ListView lstNotes;
    	private ArrayAdapter adapter;
    	@Override
    	public void onCreate(Bundle savedInstanceState) {
    	    super.onCreate(savedInstanceState);
    
            setContentView(R.layout.addnewlistofnotes);
    		txtNote = (EditText)findViewById(R.id.txtNote);
    		btnAdd = (ImageButton)findViewById(R.id.btnAdd);
    		lstNotes = (ListView)findViewById(R.id.lstNotes);
    		adapter = new ArrayAdapter(AddNewListOfNotes.this,R.layout.listnotes,R.id.txtHeading);
    		lstNotes.setAdapter(adapter);
    
    		btnAdd.setOnClickListener(new View.OnClickListener() {
    
    			public void onClick(View v) {
    				adapter.add(txtNote.getText().toString());
    				txtNote.setText("");
    			}
    		});
    		lstNotes.setOnItemClickListener(new OnItemClickListener(){
    
    			public void onItemClick(AdapterView parent, View view, int position,
    					long id) {
    				Toast.makeText(getApplicationContext(),
    						((TextView)view.findViewById(R.id.txtHeading)).getText(), Toast.LENGTH_SHORT).show();
    
    			}
    		});
    	}
    }


    android-listview-example

  4. binding more items

    - thanks to vogella.com_tutorial_twolistitems and adapter.notifyDataSetChanged(); from many crazy links which made me pretty scared if I had to code that much!!! but thank god custom adapter was not needed, a simple adapter was enough!

    public class AddNewListOfNotes extends Activity {
    	private EditText txtNote;
    	private ImageButton btnAdd;
    	private ListView lstNotes;
    	private SimpleAdapter adapter;
    	private int count = 1;
    	private ArrayList<Map<String, String>> list = new ArrayList<Map<String, String>>();;
    	@Override
    	public void onCreate(Bundle savedInstanceState) {
    	    super.onCreate(savedInstanceState);
    
            setContentView(R.layout.addnewlistofnotes);
    		txtNote = (EditText)findViewById(R.id.txtNote);
    		btnAdd = (ImageButton)findViewById(R.id.btnAdd);
    		lstNotes = (ListView)findViewById(R.id.lstNotes);
    		String[] from = { "heading", "subheading" };
    		int[] to = { R.id.txtHeading, R.id.txtSubHeading };
    		adapter = new SimpleAdapter (this, list, R.layout.listnotes, from, to);
    		lstNotes.setAdapter(adapter);
    
    		btnAdd.setOnClickListener(new View.OnClickListener() {
    			public void onClick(View v) {
    				HashMap<String, String> item = new HashMap<String, String>();
    				item.put("heading", txtNote.getText().toString());
    				item.put("subheading", Integer.toString(count));
    				list.add(item);
    				adapter.notifyDataSetChanged();
    				count++;
    				txtNote.setText("");
    			}
    		});
    		lstNotes.setOnItemClickListener(new OnItemClickListener(){
    			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    				Toast.makeText(getApplicationContext(),
    						((TextView)view.findViewById(R.id.txtHeading)).getText(), Toast.LENGTH_SHORT).show();
    
    			}
    		});
    	}
    }


    another

  5. other

    ImageView imageView=(ImageView) view.findViewById(R.id.imageView1);
    if((String) imageView.getTag() != "x"){
        imageView.setImageResource(R.drawable.x);
    	imageView.setTag("x");
    }
    else{
        imageView.setImageResource(R.drawable.ok);
    	imageView.setTag("");
    }
Posted in Work | Leave a comment

Basics Android Activities

  1. just created my first activity, reminds me of a mvc plugin to visual studio
    simply wonderfull
    http://stackoverflow.com/questions/2337874/best-way-to-add-activity-to-an-android-project-in-eclipse
  2. hmm, i missed that one.. new android layout
    http://stackoverflow.com/questions/9194366/how-to-create-a-new-layout-for-an-android-project-using-eclipse
  3. opening/showing new activity
    Intent myIntent = new Intent(HelloAndroidActivity.this,AddNewListOfNotes.class);
    HelloAndroidActivity.this.startActivity(myIntent);

    http://www.dotnetexpertsforum.com/how-to-open-a-new-activity-from-button-click-in-android-t1322.html

  4. communication activity to activity
    myIntent.putExtra("Name","Manoj");

    and

    getIntent().getStringExtra("Name")

    http://stackoverflow.com/questions/4046612/activity-to-activity-communication

  5. first/home activity among many
    http://stackoverflow.com/questions/4642993/help-with-first-android-activity
Posted in Work | Tagged , | Leave a comment

Basic GUI programming in android

how to -

  1. layout?
  2. textbox?
  3. button?
  4. new activity?
  5. strings?
  6. communication between activities?

Best features in eclipse adt/android

  1. res/layout/main.xml Graphic layout
  2. res/values/strings.xml Resources
  3. Amazing debugger and intellisense
  4. Packages: http://developer.android.com/reference/packages.html i would like to quote starting android.widget.TextView and android.widget.EditText
  5. My first edittext widget(textbox control) set/get
    EditText txtName;
    txtName = (EditText)findViewById(R.id.txtName);
    txtName.setText('0');
    txtName.getText();

    http://www3.ntu.edu.sg/home/ehchua/programming/android/Android_BasicsUI.html

  6. My first button click
    Button button = ((Button)findViewById(R.id.btnSave));
    button.setOnClickListener(new View.OnClickListener(){
    	public void onClick(View v){
    	// Perform action on clicks
    	}
    });
  7. anonymous object of an interface with a method!
    the beauty of this piece of code is, OnClickListener is an interface
    http://www.jameselsey.co.uk/blogs/techblog/binding-your-buttons-to-your-activity-the-easy-way/
  8. My first toast(message box)
    Toast.makeText(HelloAndroidActivity.this, '...', Toast.LENGTH_SHORT).show();
  9. A new activity class for every window, appending the res/AndroidManifest.xml
  10. Layouts prety confusing, i went with just the knowledge of the default Vertical linear layout adding widgets one below the other

The GUI programing in android

  1. layers – presentation layer has a GUI editor where u can add presentation controls and edit their id’s which get stored on an xml version. awesome is this xml gets converted to a java class automatically. in the programing layer, the fascinating cross layer function findobjectbyid is used – the object equvalent is derived here
  2. manipulations and access – using the object get and set methods can be used
  3. abstraction – what cant be seen here is the moment the activity class was extended with it must come events which paint the screen after events and such thus bringing to light our changes made in step 2! – totally essential to understand the flow of architecture
  4. wow – on the create event we bind a function to on-click of a button such that it does not execute then at that point but executes when the button is clicked, awesome.

The layout.xml is not scary anymore, to an extent I have started to read it successfully.

next up – database, lists/buttons/dynamic programming and communicating between activities

Posted in Work | Tagged , , | Leave a comment

how to make an anroid application

a sudden dream
instead of showing my client a web application on a laptop, i dream of the laptop/mobile/tablet outputs, for which I would need new designs for mobile interface as well as knowledge on android programming, sounds like the future, all of these things together so why not today…

googled how to make an anroid application
http://developer.android.com/resources/tutorials/hello-world.html

eclipse not classic but jee version, adt plugin instlation was problematic

finally, my first android activity…

Posted in Work | Tagged , | Leave a comment

ui design paper prototype

business opportunities – seems good, promising money in the market, if u have a product by now, need to speak to clients with a prototype…

day 2 – PR – html javascript prototype before business meets

how to make a ui design paper prototype

  1. write stories because its the easiest thing to do and cover the areas
  2. given user when sequence then module/content. write the system behavior and identify user, sequence, content
  3. identify content worth a full page – kinda un conventional be careful
  4. write your modules in sequence from home page example
    home -> register, search
    search -> patient list
    patient list -> patient
    patient -> history, new visit, notes
    new visit -> add condition diagnosis treatment, add video, add audio, add prescription
  5. allot your screen space to modules based on importance
  6. show pages where space is available rather than links to pages when necessary or number of modules higher to showcase
  7. usable, few features, fast, innovation particular to application
  8. usability testing
Posted in Work | Tagged , , , , , | Leave a comment

product launch – sports log

apr 27

eureka. another breakthrough. helpful screenshots, descriptive texts, hints, info, tips, guidelines, goals, interaction, streamlining, gamification!!

my product launch – http://sportslog.yizotech.com

apr 28

day 1 patient records

change of ui
from the last experience, no more showing edit options as a new list among list of editable links rather slide the whole window and show a new window ‘edit x’, cool huh…

change in business plans
well, android market changes everything, i saw a competing application sell only 50 copies and its free versions go 5000. i never want to sell more than 500 for a software, its unethical if u ask me. so i might need to be a application developer full time in future untill an application clicks such that we get many users. moto is ‘make the world better’ so my product solutions are going to be at solvign the worlds problems in various sectors and not making fancy games. also i will give both web applications along with android which can sync such that people can use it from desktops, i hope the web applications will be no different from the android ones, focused screens, sliding windows, etc… maybe the internet can have two to three windows at a time on one screen each being reasonably big. anyways now on, its web and andorid development to solve worlds problems and make the world a better place. heath sector, education, so on.. every single application i have always dreamt of doing, i am going do it, no corporate going to stop me from it, hehaw!

who wants to see what when
actor -> data/module -> sequence

Posted in Work | Tagged , , , , , | Leave a comment

dynamic programming…

April 26

my god, the behavior i discovered has lent to many bugs, especially the functions making use of parent function variables which get changed on further events, so loosing the value of where change has to be made!!!

andorid
i finally got into the grove of user intefaces and development, a big mistake i did was to forget my design pricialals of inputing data and gonig forword with using ‘a’ text field for ‘a’ input type and not occuping the screen

android seems to be very promising, the application can be local, saving data without connecting to online servers for every action but synchronise when needed.

so do android development come with database support, given googles web app and their easy database quering, i am sure it does, hopefully :D

dynamic programing
its an awesome thing, the dynamic programing i am speaking of here is the ablity of functions to insert user interface elements and bind them to new functions in run time and thus even writing new functions which handle the user interfaces dynamically..

the big problem here is a standard or framework, huge amount of code, very un modular, take for example inserting html as text instead of objects and accesing them by id’s and making objects sounds very lengthy

so be it web apps or andorid apps or desktop apps, dynamic programing would be similar when it comes to inserting say rows and rows or new data

my code review from dheeraj kumar aka dk:
“‎Manoj Kumar P has some seriously fucked up code. The steps to fix this are:
1. Replace every single instance of concatenated magic strings with templates. I recommend Mustache. Use ICanHaz.js if you like.
2. You’re doing event handling wrong. A separate function for binding + definition = wrong. Also, binding + definition inside another callback(save) is wrong. That code smells.
3. Nobody likes a show(‘slow’)
4. WTF? Client is not supposed to bust cache. That’s the server’s job.
5. In any event handler, handle the original event AFTER you’ve done your custom processing. No event.preventDefault and then your code.
6. Your selectors are highly detailed, and hence highly inefficient.
7. Stop using random HTML attributes which are not part of the HTML5 specification. For storing data in HTML elements, use the data-* attributes instead.

As far as your space filling question is concerned, figure out how to use Zurb Foundation or Twitter Bootstrap properly. Those are very powerful.

Plenty more that can be done, but let’s deal this one step at a time.”
“‎2. that too.. since you have a large handler and it looks bad in the bind call. My point was stop binding within callbacks, which is an antipattern in your case.
4. ?action=getRoots&bustcache=” + new Date().getTime(),
5. That’s a good pattern in any framework. Teaches you not to mess with the event object. Also, sometimes you’d rather stop it bubbling up the event chain by a return false or something depending on your language, so it’s always better to handle the original event at the end.
6. Write better HTML.”

Posted in Work | Tagged , , , , , | Leave a comment

funny javascript…

Apr 24

$(‘#divdays’ + rootid + ‘ > ul > li:last’).before();
i never thought i would be using code like this, total score :D awesome :D

always work on db, webservice then your javascript/html because when the last bit is done the total functionality is going to work ;)

programing is like a house building, brick over brick…

Apr 25

binding a click function to an element – not too early and not twise
u dont want to bind before the code is inserted into the html because it wont get binded then, it gets binded to only those applicable elements and u dont want to do it twise on the same element especially if the behavior is like a switch, it starts to get funny!!!

you download data and you bind, not just that, you insert data and you have to bind those single items too!!

javascript is a lot of dom which is input as text and accedd through objects, so maybe if the html hirecry is created by objects rather than text…

funny scope of variables in javascript -

<a href=”#”>abc</a>
<script src=”javascripts/jquery.min.js”></script>
<script>
$(document).ready(function(){
x = 10;
c();
});
function c(){
$(‘a’).click(b);
}
function b(event){
event.preventDefault();
alert(x);
}
</script>

believe me or not, value of x is alerted on click of link;)

big design issue – repetetive functinality of say adding which involes extra divisions and binding divisons and binding buttons to post and all this needs to be copy pasted twise if it has two trigger points, so one after downloading data and two after inserting fresh record… how do i design it…

speed, friendlyness, sticking to design specifications rathen than being generalised, i guess are the three main issues to ui design…

Posted in Work | Tagged , , , , , | Leave a comment

hierarchical jquery selection and manipulation

level 2 and 3 in hierarchy “recursive nested {{tmpl}} tags” maybe just what I want, simple yet tough design element!

dynamic hirechial – score

<script src=”javascripts/jquery.min.js”></script>
<ul>
    <li>
        <a href=”#”>root1</a>
    </li>
</ul>
<script>
    $(document).ready(function () {
        $(“.root”).click(function (event) {
            event.preventDefault();
            $(this).attr(“x”, 1);
            $(this).parent().after(“<li><div id=’divdays1′><ul></ul></div></li>”);
            $(‘#divdays1 > ul’).append(“<li>1</li>”);
            $(‘#divdays1 > ul’).append(“<li>2</li>”);
        });
    });
</script>

Posted in Work | Tagged , , , , , | Leave a comment

day 4 – sports log

migrating from mysql to mysqli, writing mysql was a big mistake

no multiple queries and my hosting provider gives me no permissions to write procedures on the db, so im going with multiple queries instead of stored procedures!!

it was a mistake i dint have a data access layer, but with mysql it was not so necessary either, now with mysqli it has totally come into place…

zend php sucks, no proper intellsence nor error finder, i don have a debugger either.. moved to notepad++ might need to check out komodo sometime…

migrated from mysql api to mysqli api

man this $this-> thing is getting over my neverve

implemented multi query instead of stored procedure thanks to bluehost.com

to debug one bug it takes me hell lot of time, especially when testing on my remote environment, i dont get the presise error unless i test it locally, i test on database to get the error that i had my database wrong in the query!! :(

all i have done till now is users, loging, signup, logout, checkloginonpageload, redirecttopageloadonlogin, loadrootelementsonpageload, addandsavenewroot

now i need to get serious, i need to add day nodes to an root node, for that i need to add ids of root nodes into each root node and add a class to each node and add a common on click for those class and write a function which takes the id and obtains text and adds data node for that id as parent

this part looks easy “$(this).attr(“x”, 1);” , “$(“.root”).click(function (event) {…” etc, what might actually be tough for me is prepare the html and html in javascript or hide/show div for this action

just one thing – i added some links with some javascript and was wondering why their click events dint bind, i had to bind them after they were inserted into html, hehe!!

first step in my code is ‘$(this).parent().after(…’

next step is to figure what goes inside that!!

Posted in Work | Tagged , , , , , | Leave a comment

making a web application

making a web app

1.1.get ur requirement, problem statement, make a design, go back to your client with that and ask for raw datas…
1.2.better get how it is written on paper, u almost have a design there
1.3.complete your design, all the buttons u need etc…
1.3.use foundation and translate it to html design – tough part, u might have to use lists, tables, embed tags etc…

2.1.low level design, write down the events, which are probably ur webservices, and your database procedures
2.2.create database tables abstract or expanded, how ever u want, depending on future expansions…
2.3.write your webservices-its a whole new chapter now…

3.1.write client side code-similar to writing a webservice, slightly different…

tada, your application is ready!!

Posted in Work | Tagged , , , , , | Leave a comment

excitement is it a good thing or a bad thing?

excitement is it a good thing or a bad thing? but its one thing-when too much u need relaxation,when too less u need some to work any bit ;)

why not object oriented databsed to relational database because my function getData on the webservice download relation data from mysql.Data table

which is

mysql.Data.Root

userid,rootid,rootname

mysql.Data.Day
rootid,dayid,dayname

mysql.Data.Data
dayid,rowid,columnid,data

i need to get root[day[data(2d)]] and make it an object and pass it as JSON anyways!!

instead i can do a

mysql.Data.Data
dataid,parentid,rowid,columnid,data

lets say all root nodes are data with parentid=null and uniue(rowid)’s columnid=0(basically each row with just one column)
and all day nodes are data with parentid=something(root nodes dataid) and uniue(rowid)’s columnid=0(basically each row with just one column)
and all data tables are data with parentid=something(day nodes dataid) and rowid,columnid

breakthrough!! i dont need to download all data and think about unions and joins, remember i have ajax, i simply need to download root nodes first, then when a root is expanded its day nodes, when a day is expanded, its data nodes! bingo, problem of mass data and encapsulation solved, this really feels good.

why web choose me and not research, big topic, later :D

i am never a book worm competitive type rather than a pratical fella, again knida big topic, for later ;)

Posted in Work | Leave a comment

Coding and Design after a long time

php is crazy, something crazy happened..
somehow this is not allowed
class A{
}
class B{
$a = new A();
}
but instead this is allowed
class A{
}
class B{
public $a;
public function __construct(){
$this->a = new A();
}
}

next crazy thing that happened today, i confused the ‘.’ with ‘->’ well its not like c where both are kinda used, well first when object is not a pointer and when it is. but in php looks like th ‘.’ is only for string concatination!!!

next crazy that that is happening today is the die command on error along with my destructor returning json data are doing the work twise!!! yup…

next crazy thing is take the json return output to the destructor! but when it fails instead of dieing at the constructor it will pass through the function!
if you die() inside a function of an object you still run the destructor, thats annoying! lol..

things i did today
——————
i abstracted Data i return with functions that set error message as it comes with also setting the success to false, otherwise setting it to true and the data…

then i took the output from the end of each function, be it from the constructor or catch statements to the destructor, well my belief is if i catch error on destructor and print it it will be second allready, becase first would have been from function success yea?

simple, you die, and still it goes through the destructor, so you print json return output data there, and you dont go through the functions!! unconventional but it works, looks well abstracted, not much of a problem, maybe i ll add a patent to this kind of a standard, heehaa!!

code

Posted in Work | Tagged , | Leave a comment

My own company

yea, i am right here working on my own start up, its been quite a while since i could take this decision, especially full hearted without noise, it was all about to happen. i am a average to good programmer, i dont want to exaturate my skills, i am not a hacker, but i know i can be, my skills are strong fundas and simply programming over a few languages, i don want to brag about that.

my story is something like this – i was very enthusiastic to learn my first programming in html, used to spend all my time doing websites, even the tags frameset used to put me off the hook, i think my journey started there, maybe not, lets see. i must mention something, i did learn logo at school with all the draw left,right,home thing, but i was not really into it at that age, i was kinda very attached to my computer class at std 9 and 10. it continued during std 11 and 12. it was c programming, thats really amazing right. it threw me off the hook, to play with the console, reading input, processing math or simple logic and writing output was simply awesome then. my fascination with that and how loops worked kept me occupied, untill i discovered i could made games. thats it!! i spent all my time making games. tic-tac-toe on a console screen a simple matrix data structure was probably my first and last game, hehe… my friends introduced me to graphics and gave me the most awesome thing that happened to me in the next 4 years which was mouse.h!!! ealier during those days i dint know about internet or how you could make use of the internet, so i simply worked… i took off from a project i think from online which drew a line joining last two mouse points, that was the start of my very own painting application, it actually turned cool, where i converted my bugs to effects!!! i had also made a few other ball games…

this is going to be a really long story, so to cut things short and go back in track to why i have my own start up… my first big thing was php, not without my team mate kartik, he and i cracked php mysql and erected a portal in a very short time… maybe thats when it all started, maybe not…

my whole spark of a genius came a while back, recollecting my skills, which were what i inherited from my work at infosys, asp.net it is… i have worked on a couple of projects erecting n-tier applications which were both big and which were implemented by a team, we also did all the design and a friend/team mate did a lot of database coding then.. which even now i have little idea why… eventually some day we ll know about that..

point being, i was a website designer who could make websites on asp.net, especially if you business is like a data archival site with search feature

so i thought, most of the sites have the same logic…

after being convinced html/css/javascript is enough for client side and any language for server side will do, im working on html/foundation/jquery/php applications, not like the traditional php spiting html and javascript code but through ajax calls and php web services!

i am reading up stuff online and trying hard to get the best possible architecture! mvc/dal/error handling/validation/encapsulation/ajax-json…

more info soon, next update in a month ;)

Posted in Reflection | Leave a comment

social gaming

after hours of rnd with the game tiny village i cracked the formula for the addictive social level up games – its power.

just like age of empires, your research gives more weapons and town upgrades gives more research inturn giving more weapons

here though you have complicated tasks like collecting food and making villagers,
villages make more food,
food is needed to make miliary and villages are needed to make military buildings
gold is rare yet involved in the finer technology and miltary items
various linkages but ultimately you win the game by conquest or reaching goals first

only thing so different in social games is it has the same varied linkages in its operations
but it too accumulates power
yet doest finish in two hours but goes on for months and years – yes a single game…

farmwhile
money is needed for seeds
seeds reap in x hours to cash
you play it for a lifetime leveling up experience in above operation
what motivates you play the same thing again and again is that each time you gain more power
or better seeds to your spend-gain ration on money and experience

city of wonder
population needed to level up
population is raised in houses
culture buildings support population to be happy
making goods is a commitment that you will come back to play the game since they perish
military and defense exist
trade points exist
population keeps ticking but presure on supporting culture buildings and space

the whole thing might have been a easy guess, especially with age of empires and farmwhile, but it has been well abstracted in tiny village, where i was lost knowing what my goal is yet doing tasks to grow stronger

tiny village
houses support villagers
houses and public buildings generate revenue
villagers needed for 4 different resources
ie 2 villages one for working and one for hauling
stores of each resouce convert resouces to products making revenue and experience
resouces generate slowly
more stores needs more resoruces
stores cap houses
double the number of villages are needed for the 3 compound resouces
market exists with high exchange value only on lumber compound resouce
cute dinosours hatch in a hatcher, move to a habitait, grow by eating on money
dinosours make 250in cash quicky once they grow, but not more

you need money to buy new stores or resouce or houses or grow dinosours and mainly to expand your town

if you are a hardcore gamer you would still probably get bored by level 17-19 when you realise the truth about the game that even if you lived completely on wood, lumber and furniture store to make your money you would still not be so powerfull like you thought you would be. so what the hell are you making with rocks, stone, fur and fruits? is it worth your time :D

what happens when you have unlocked all the techonolgy and completed all your conquest, game over, hehe.

Posted in Gaming | Leave a comment

Monday, Feb 13, 2012

A new life, a new day, a blog post after a really long time

Its so difficult to understand what things mean, especially when you have a hard time with yourself.

There was a time when i used to blog literally every thread of my processing mind

a lot of things come to my mind in association with that – Brain geometry – neurons have a tendacy to link u with each other neurons in picticular geometric ways which make certain geometric aspects more easily memorised than others. I always remember long roads buy sets of pairs or rectangular strips so i know the road connecting nessapakam to ashok pillar would be 8 blocks or 4 paris(i might be wrong here). Strange

I love Social networks, the idea of copying life to an online world is totally cool and has loads of perks attached to it. Think about how much you can process and analyse when you have the data at hand(im definitely not an expert)

I love computers too, but lately i have been sufeering a disconnect from my ‘spidey’ sence

writing is a great way of putting things together but i have no guess if its worth it(definitely not yet)

Meditation
i can write a book about this and how you could mess you life with it(hehe its just my belief). but think about the movie ‘naan ambani aaven’ neither he did not he dint his words leave behind the spirit. Life is not mythical fantasy where god answers tapasi and grants desires nor is harry potter to conjure minds imaginations but rather too much of focus fools your mind into beliving an alternate reality.(call it stress if you are in good terms with meditation!)

My new idea or gutt instinct for the day is that internet now is full of services that connect peoples online identities but do they have a real world meaning. are friends on facebook eqal a friend in reality. How much you trust people online. How much the internet has found you real friends or made you real networks(I definitely have an issue with it)

Trust-1.0
I am definitely not a facebook guy not a facebook api guy. I love to think about owr own network/ owr own features. So be it ‘educational reform’ it happens on own network(Maybe it will take some time to realise facebook api is a easy on users). Trust-1.0 is an ideawhich brings digital to real and not just real to digital. Inspirations Everlasting effects of Ghost in the shell and motivations – just seen sony pix movie the social network.

I am totally curious about how data flows on social networks. I am looking forword to plot a network or circles. Facebook is definitely not your wordpress site where you get to install php scripts for this kind of stuff on your blog post. but rather you need to API.

How do you track who clicks the links, how do you vizualise the friends/circle on your networks.

I love multiplayer, but something i have not been able to answer myself is how i play the farm ville type of games. They need a special mention here.

you don need to keep links on your data to see how it spreads on the network, all you need is data of friends friends interactions and an easy way is to get permission of people on facebook and 2) create a evolving network structure 3) specialsed views

all i need is a network vizualisation algorithm.

God damm i envy the guys running facebook, if i were the founder of facebook i would give let people have videos for profile pics :D

Posted in Reflection | Leave a comment

Pizza

Posted in Cooking | Tagged | Leave a comment

Mexican chicken

Posted in Cooking | Tagged | Leave a comment

Spanish chicken

Adding less butter to cook chicken on high temperature brings out all the water from the meat!

Posted in Cooking | Tagged | Leave a comment

Tai Chiken Curry

Posted in Cooking | Tagged | Leave a comment

Chicken Biriyani

Posted in Cooking | Tagged | Leave a comment

Grilled Chiken Pita with Chips Recepie

Posted in Cooking | Tagged | Leave a comment

The brain, blogged :P

Some thing interesting has been happening on my brain quite some time, so I guess its time to bring it to the blog..

Courtesy to my course, my highly influencing module lectures and a few recent ted talks(ideas need to be connected more than securing[1] & I am my connectome[2]) n lastly to my brain n everyone who gave it sensory inputs.

We all are familiar with neurons, the old news being there are millions connected to each otherwith specific unknown electrical function and collectively they do the u ultra cool stuff of sensing, acting and memory etc which is us.

The new news and the point that’s been on my my mind quite some time is the same thing as the old news but with the perception of how the shape of the connections might actually be the way memory and processing are represented by our brain, goose bump stuff..ain’t it amazing!!

Save your goose bumps for my recent experience acting as a evidence to this argument :D

Just before the eureka moment
Being influenced by the talk on I am my connectome[2] I did spend a lot of time thinking ‘ man! The job is almost done now, we are going to know the brain now…’ Which meant any thing and every thing regarding to how we function can be reasoned out, added our problems can be found and simply corrected..just like debugging or fixing a computer.

The feeling of a neural current
I apply the above with few if my current problems (not knowing my motivation had or not an influence from recent exposures). I am able to recall one instances or experiments which I wish to call it, which is the most striking one that relates to my posts argument. Also below described experiment is more of a personal cases, which might be a bit distracting and silly or even strange, but I am proceeding with it for the sake of science (or rather just myself…yet that maps to a collective thought..anyways later!)

Experiment 1-
Salt is forgotten each time I prepare dal n rice (which are cooked similarly by taking them in separate containers, washed two to three times soaking in water and mixing gently with the hand.then I place them both into the cooker, wait for the whistles then lower it in exactly 15 mins. Wanting to serve it hot each time I rush to a plate and transfer cooked contents for the meal……but I don’t know till now I forgot to add salt!, just as I have my first spoon I realise I missed the salt and n then add salt to taste slightly better!.
But then I did the same mistake every time. Times when I found myself not adding salt until then I immediately do so, but I don remember when ask I did so.

Bingoo! But something stumbled into place much like an accidental habit n same leading to my better understanding,
I recollect adding salt after I wash the dal by sprinkling on it…i don know how n why but it was the third or so time already. That was when I knew my actions had a flow and if I need to change it then it too must be a new flow,a good one,a reasonable one, the best one! This flow I knew was my neural current.

Finally, A jump to further thoughts for the future
What if our neural networks can be optimised r normalised (they must all ready be..that’s why we connect new learnt items with old ones using same neutral nets!.. Yet when we place/install new chunks of neutral nets into the brain synonymous to downloaded functionality, then, we would definitely need to optimise else our brain would heat up n go crazy!)
I like the idea of Brain scanner which is described on the talk [2] as we would then be able to read stored memories etc

References
[1] http://www.ted.com/talks/steven_johnson_where_good_ideas_come_from.html
[2] http://www.ted.com/talks/sebastian_seung.html

Posted in Reflection | 3 Comments

Beyond Time – A Draft

The Story Of Our Parents


As I was having my shower thinking about the sad things and what ppl say and finally about our life.. I hit on something very fascinating..a goosebump giving thought about our life and universe.. I am sure by the end of this discussion you would have the same feeling, a new understanding of our origins and time …

Many a times the lines of kalil Gibran come back to me, so it did this time too.. a lady asks him what is the meaning of a mother? He very poetically answers his philosophy where he mentions children are like arrows sent by the couple.. and thinking about that is where the below thought sparked with shine,

Think about the planets, we all know the universe if ruled by laws of attraction atleast for now, and that every matter attracts each other depending on its size and distance. The law of attraction is so common even for us, the more the gain and less the proximity we take it.

But, what happens after that? Think about the universe, now scientists observe planets and galaxies moving away from each other and the attraction is dying and the universe is ever expanding. This is where we end our discussion generally, not knowing about the beyond … when we believe time started ticking the day of big bang and we are in our present!

But now, I have a different opinion, What If just like the arrows sent by the mother/father who even came together by the laws of attraction ARE LIKE THE GALAXIES BORN TO OUR PARENT BIG BANG !! thus what if the galaxies are only moving away from each other only in hopes of meeting other galaxies that HAVE MOVED AWAY FROM OTHER BIG BANGS!!

Our Parents Are Just Like Us, Our Parents are Not Just Our Sun And Solar System, They Are Our Galaxies and Big Bangs, They Too mate jus like us, They Too Heat Up and Big Bang and Produce HalfSprings by Crossing plannenatary substances and matter just like us and produce variety of new galaxies and send them in all directions..

Thus we never know when time started ticking, big bangs must be happening right now, population of the big bangs may be over hundreds and millions, we never know or even we could be the first, but one implies many, it is possible… but think how long it would take for different bingbang galaxies to meet and big bang again… its scareingly too huge

I would like to conclude this writing with a very special note – just like how fascinating it is to relate to the similarities between the planets big bang and our reproduction…something that is very special is..buy some means, god knows how and where, a miracle that is ‘US’ has been created, we sure can expect many life forms that are completely different from other big bangs as their crossing would have been with totally different materials to be found in this universe which have the magical attribute of conscience. Hope we find ways to travel beyond galaxies & big bangs and colonize the universe and beyond.

Posted in Reflection | Tagged , , , , | Leave a comment

Secret of Google

Son: dad, did u know, Google comes up with so much, and everyone use it!!!

Dad: In any business, if one listens to customers first want, the business is successful

Son: huh, its not easy to know what customers want, we need to ask a million people!!

Intellect: EURAKA!!!! What is google? They know what the whole world is SEARCHING FOR!!, people search what they want there, nothing less!!!!, what else google needs to know, they simply need to analyse that!!! hmm ….

Google: Muhahahahaha!!! 70%+ market cap, I know what u want right now >:D

Posted in Reflection | Tagged | Leave a comment