Jump to content

small code challenge


Recommended Posts

Posted
1 minute ago, yomama said:

c# aa swift or obj c using man. But ikada key value rendu strings and you are trying to assign int to string. 

I don't know obj c or swift but neenu akkada em chesthunna ante I am trying to send the item key to a seperate function which calculates the continent based on the logic and returns an int and I am using that integer in the switch case. 

 int continent = GetContinentIdFromKey(item.Key);

this above function here takes in a string (item key in our case) and returns an integer like 1 for europe and 2 for asia  and finally using that integer in switch add item to individual array. 

 

Posted
42 minutes ago, Suhaas said:

Sure bhayya. I usually a separate the logic for unit testing or whatever reasons. 

PS: I am not an expert. Just trying. 

thats the way it should be..granularity, maintainability..simple and precise code  

Posted
17 minutes ago, Suhaas said:

I don't know obj c or swift but neenu akkada em chesthunna ante I am trying to send the item key to a seperate function which calculates the continent based on the logic and returns an int and I am using that integer in the switch case. 


 int continent = GetContinentIdFromKey(item.Key);

this above function here takes in a string (item key in our case) and returns an integer like 1 for europe and 2 for asia  and finally using that integer in switch add item to individual array. 

 

yeah i understood that. using that method to get a int and switching it. 

Posted
12 minutes ago, Popkatapetapotapulti said:

TS inthaki aa small challenge ekkada @3$%

@3$% ne level challenges will come soon, wait till then.

Posted
2 minutes ago, yomama said:

@3$% ne level challenges will come soon, wait till then.

looking forward to it  PK-1_1.gif?1344496355

Posted
1 hour ago, Popkatapetapotapulti said:

looking forward to it  PK-1_1.gif?1344496355

@3$% how many IDs you use again?

Posted
1 hour ago, yomama said:

@loveindia Good job man. 

loveindia.png

nenu appudey anna man... no IDE using windows laptop in office so couldn't test in swift.. atleast should have used IBM swift before I pasted it... swift lo append undi... intellisense ki alavaatu padi marchipoya man... but max raasa correct gaaney... :D way to go man...

Posted
1 hour ago, yomama said:

@3$% how many IDs you use again?

you asked me this second time..this is my only id dude 

Posted
30 minutes ago, Popkatapetapotapulti said:

you asked me this second time..this is my only id dude 

@3$% happens man this is DB

Posted
1 hour ago, loveindia said:

nenu appudey anna man... no IDE using windows laptop in office so couldn't test in swift.. atleast should have used IBM swift before I pasted it... swift lo append undi... intellisense ki alavaatu padi marchipoya man... but max raasa correct gaaney... :D way to go man...

yeah ufcourse man you are correct. Nen just simple syntax errors fix chesa anthe ga. i just like xcode ide , it supports everything i guess. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...