₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,037 members, 8,420,012 topics. Date: Thursday, 04 June 2026 at 09:28 AM

Toggle theme

Javanian's Posts

Nairaland ForumJavanian's ProfileJavanian's Posts

1 2 3 4 5 6 7 8 9 10 (of 57 pages)

ProgrammingRe: Storage Bindings Of Variables by Javanian(op): 1:06pm On Sep 05, 2016
CodeHouse:
I guess people have the same book you read and make more use of the internet these days, this forum hasn't been "moderator driven" for years, most people are getting their facts from whatsapp group these days...nice to know you are back, right?
Yeah, I will try to be more active.
ProgrammingRe: Storage Bindings Of Variables by Javanian(op): 12:30pm On Sep 05, 2016
danvery2k6:
On this, I do understand that the heap does not have size restrictions on variable size, apart from the physical limitations of your computer. Heap memory is also slightly slower to be read from and written to because one has to use pointers to access memory on the heap.
You are very right.

So when you say that Heap Dynamic Variables are memory prudent, what does that really mean? Or better still, how/why are they considered "Memory prudent"?
Speed and Memory efficiency are actually two different things. So you are right Heap Dynamic variables both explicit and implicit are slow relative to static and stack dynamic variables. They are memory prudent because the value of a memory slot can be changed at runtime when they are no more needed. Those memory slots can then be replaced with values that are then needed. The example I gave in Python:


#!/usr/bin/python
str = ["Java", "Python", "C++", "Delphi", "Fortran"] #implicit heap dynamic variable 'str' is created at runtime
print str
str = 5 #implicit heap dynamic variable which was previously a list of length 5 is now an integer
print str
The variable str holds a list of 5 strings. In Python 2.7 a string is represented by 32 bits in memory. So the list holds 5 strings which would be 160 bits in memory. As execution continues str now holds an integer with value of 5. An int in Python 2.7 is just 12 bits. So the variable str would have saved a 160-12 bits of memory by being able to do this. This is not the case in static variables and stack dynamic variables. So basically heap dynamic variables sacrifice speed for memory prudence and writability.
ProgrammingRe: Storage Bindings Of Variables by Javanian(op): 10:53am On Sep 05, 2016
So? No Takers? I don't want to believe this thread is very esoteric.
ProgrammingRe: Storage Bindings Of Variables by Javanian(op): 4:50pm On Sep 04, 2016
danvery2k6:
Finally, someone has decided to come back from recess. Nice articles.
Many Thanks.
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
Please this topic is open for discussion. Let us talk more on implementation in other languages I didn't mention or challenges encountered in implementation. I recommend Concepts of Programming Languages (10th Edition) 10th Edition by Robert W. Sebesta to anyone who wants elaborate explanation of the topic. It is a really great book.

http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
Implicit Heap Dynamic Variables

In Implicit Heap Dynamic Variables, allocation and deallocation are done only when the variable is assigned a value at runtime. Allocation and deallocation are done at runtime from the Heap.

Strengths

-They are very flexible
-They make optimum use of memory

Weaknesses

-They are very slow
-They are not history sensitive

In Python


#!/usr/bin/python
str = ["Java", "Python", "C++", "Delphi", "Fortran"] #implicit heap dynamic variable 'str' is created at runtime
print str
str = 5 #implicit heap dynamic variable which was previously a list of length 5 is now an integer
print str


http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
Explicit Heap Dynamic Variables

In Explicit Heap Dynamic variables allocation and deallocation are done at run time by explicit instructions written by the programmer. Allocation and Deallocation of explicit Heap Dynamic variables is done from the heap. They are created with Pointers and Reference variables.

Strengths

They are very memory prudent.
They can be used to create dynamic data structures like Linked Lists and Trees that can grow and shrink during execution

Weaknesses

-They require pointers which are very complex to implement
-They are slower than static variables becasue of the incured overhead in allocation and deallocation of variables

In C++


int *intnode; // Create a pointer
intnode = new int; // Create the explicit heap-dynamic variable

delete intnode; // Deallocate the heap-dynamic variable


In Java all objects are explicit heap dynamic variables and are accessed through reference variables. In contrast to C++, Java does not allow explicit deallocation of variables, deallocation is done implicitly by the garbage collector.

http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
Stack Dynamic Variables

In stack dynamic variables, storage bindings are created during elaboration of a variable, Not when execution starts but when execution gets to the variable(elaboration). Stack Dynamic variables are created at run time when execution has begun. Like static variables deallocation cannot be done until executions is complete. In stack dynamic variables both allocation and dealloaction is done from the run time stack

Strengths

Stack Dynamic variables are more flexible than static variables. They can be used in recursive subprograms.

Weaknesses

Stack Dynamic variables are not history sensitive
Stack Dynamic variables are slower than static variables because of the incurred overhead in allocation and deallocation of variables and aslo in requires indirect addressing.

In Java, C++ and C#, variables defined in methods are by default Stack dynamic


class StackDynamicEg
{
void counter()
{
int count = 0; //Stack Dynamic variable
}
}


http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
ProgrammingRe: Storage Bindings Of Variables by Javanian(op):
Static Variables

Static variables are bound to memory cells sometime before execution and remain bound to the same memory cells until program execution terminates. This means values are assigned to the memory cells of a variable before execution of a program begins. Global variables are usually static variables although a lot of languages allow subprograms to have static variables called "local static variables". Class variables in a lot of language implementations are usually static variables. Class Variables are created sometime before program execution begins.

Strengths

-Static Variables are fast. They can be addressed directly unlike other variables that require indirect addressing which is usually slower.
-Static Variables are history sensitive. They always remember.

Weaknesses

Static variables reduce programming flexibility. They do not support recursion.

In Java


class StaticVariableEg
{
static int count=0; //count is a static variable
public void increment()
{
count++;
}
public static void main(String args[])
{
StaticVariableEg ob=new StaticVariableEg();
ob.increment();
System.out.println(ob.count);
}
}


The Implementation of static class variables in Java is similar to that of C# and C++.

C and C++ have a static specifier that can be used in variable definitions in a function to make the variable static.

http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
ProgrammingStorage Bindings Of Variables by Javanian(op):
Hi,

This post is meant to describe variables into four different categories based on their Storage Bindings. The Binding categories will be

- Static Variables
- Stack Dynamic variables
- Explicit Heap Dynamic variables
- Implicit Heap Dynamic Variables

I will describe each category in detail, list its strengths and weaknesses and implementation in languages like Java, Python, C, C++ and Javascript.

http://solomonubani..com.ng/2016/09/storage-bindings-for-variables.html
http://solomonubani.com/2016/09/storage-bindings-for-variables.html
Tech JobsRe: Hard-Working Programmers Wanted For Website Development by Javanian: 5:59pm On Sep 01, 2016
[quote author=Seun post=16654448][/quote]@Seun, I am still awaiting a reply. Just a reminder tongue
PhonesRe: Contact Number by Javanian: 3:49pm On Aug 30, 2016
Type 0700 and then type H, E, R, I, T, A, G and E on your phones' keypad. So in this case the number is 0700-43748243
Tech JobsRe: Hard-Working Programmers Wanted For Website Development by Javanian: 10:45am On Aug 29, 2016
Seun:
Can you build dynamic websites that are fast, easy to use, and difficult to hack?

Have you mastered PYTHON, Scala, Java, Golang, Objective C/C++, C#, Ruby, Clojure, or Perl?

Do you strive to write programs that are efficient & concise but easy to understand and maintain?

Can you design normalised SQL schemas and write efficient SQL queries for complex applications?

Can you quickly learn and master new programming languages, platforms, & APIs for immediate use?

Are you smart enough to comprehend & implement intricate Computer Science algorithms when needed?


If your answer to every question above is "yes", then the humble start-up responsible for developing and maintaining the top website in Africa needs you. We will hire 3 to 5 brilliant programmers this year to help us to develop and maintain our current and future websites.

The boss is committed to creating excellent working conditions for programmers, because he's a programmer himself. Every programmer will have an ergonomic executive chair, a huge desk with ample legroom, and a beautiful desktop computer with a quad HD touchscreen display and high-end specs. Our programming office has all-day air conditioning and lots of space. Commuting from Lagos will be fast and stress-free due to traffic dynamics.

If you're interested, please send an email titled "Developers Wanted" with your complete CV, links to your github/bitbucket/google-code/stackoverflow pages and any other evidence of your programming ability to [b][/b]. Thank you for your interest.
@ Seun please you have a mail, I am interested in an Entry level Software Engineer position in Nairaland.
EducationRe: Can You Solve This Interesting Math Puzzle? by Javanian: 4:32pm On Nov 01, 2015
0 0 0 -> tan-1(0) -> 90 -> 1328 -> 132 -> 1 x 3 x 2 -> 6
1 1 1 -> 11011112 -> 1 + 1 + 0 + 1 + 1 + 1 + 1 = 6
2 2 2 -> 2 + 2 + 2 -> 6
3 3 3 -> 3 x 3 -3 -> 6
4 4 4 -> 1101111002 -> 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 -> 6
5 5 5 -> 5 + 5/5 -> 6
6 6 6 -> 6 - 6 + 6 -> 6
7 7 7 -> 7 - 7/7 -> 6
8 8 8 -> 11011110002 -> 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 +0 + 0 -> 6
9 9 9 -> 11111001112 -> 1 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 1 - 1 -> 6
European Football (EPL, UEFA, La Liga)Re: Fc Barcelona Fan Thread: "més Que Un Club" by Javanian: 1:22pm On Sep 30, 2015
Krasid:
4 goals in a UCL semi final game against the greatest team of all time. which Barca player has done that? 5 league goals in 9 minutes? But, but 'almighty' Suarez should not be compared to Lewy.
Most successful club of all time not greatest team of all time. You cannot call a team that went trophyless in 2013 the greatest of all time. Stop trolling.
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 10:20am On Sep 23, 2015
Raypawer:
Lol... sad you cant be a jack of all trade, Master of Non. even the cs students will opt for one area of specialization.
Well, I have made my point. The decision is yours to make.
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 6:41am On Sep 23, 2015
pcguru1:
Javanian is 100% right, Aptech cant teach you Computer Science only a few subset which is why I do a coursera for what Javanian wrote. I will be honest a CS degree is way better. Writing code is not everything writing efficient code is. As far as am concerned I didn't learn anything I didn't already know from Aptech just did it for the certificate. Already started working as a programmer while doing Aptech so really if u ask me right now where tutorials are available and freely obtainable everywhere. I think Aptech is a waste of time and money but that's my opinion.
Et voilà. Merci beaucoup.
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 9:10pm On Sep 22, 2015
Raypawer:
i dont know what you mean by CS degree but this Link will Help you
http://www.mdx.ac.uk/about-us/academic-partnerships/our-current-partners/aptech-partnership
From the link you posted, all the ADSE can offer you is a degree in Infromation Technology which is just a subset of CS. I expatiated on this in my penultimate post. There is no reason you should go for a degree in info tech, when you can spend similar amount of money and get a degree in CS.
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 4:17pm On Sep 22, 2015
Raypawer:
So you know all these huh or how many computer science graduates from Nigerian Universities can even Code ? not to mention all these huh angry
"All these" are essential parts of a CS syllabus of any university. I know a lot of CS graduates and undergraduates from Nigierian universites that can code. Don't be complacent about your academics. Don't settle. If you can afford to pay over a million naira for a Diploma, I don't see what stops you from attending a good public or private University home or abroad and getting a proper degree. The rigors you pass through in getting a CS degree doesn't just make you a programmer, It also makes you a scientist. Endeavour to get a CS degree if you can. There is no reason you should settle. Your cynicism would do you no good.
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 11:55am On Sep 21, 2015
Ochiske:
what is your definition of computer science?
From Wikipedia, Computer science is the scientific and practical approach to computation and its
applications. It is the systematic study of the feasibility, structure, expression, and mechanization of the methodical procedures (or algorithms) that underlie the acquisition, representation, processing, storage, communication of, and access to information.

A computer scientist should be able to write codes, programs, develop softwares, etc.
Yeah, these are just few of the many things a Computer scientist should be able to do. But it doesn't end there. Computer science is a very vast and very theorotical field. Do you do courses like Operation research, Design and analysis of Data Structure and Algorithms, Formal langauge and Automata, Discrete mathematics, Linear algebra, Calculus, Probability theory, Compiler Design, HCI, Artificial Intelligience, System analysis and design, Network and Graph Theory and so on? These are the bedrocks of CS.

I'm yet to see a Nigerian university that teaches all that.
How many Nigerian Universities have you been to? Which of them don't teach these things?
ProgrammingRe: Aptech ADSE Or Nigerian University Which Is Better? by Javanian: 10:42am On Sep 21, 2015
Ochiske:
Yop. That's what I'm doing right now now. At Aptech Calabar. our final year students are leaving this september. What they teach is better than NIgerian Universities.
Please pardon my naivety and ignorance. What exactly are you guys taught? I am more than certain you are not taught Computer science. Information Technology is only a subset of CS, so how can you possibly know more than someone with a degree in CS?
Technology MarketRe: **Shop/Ship Gadgets/Fashion from USA or Great Automobile Deals from Canada by Javanian: 11:48am On Aug 14, 2015
Received my books Artificial Intelligence: A Modern Approach (3rd Edition): Stuart Russell,
Peter Norvig and The God Delusion by Richard Dawkins in good condition. He delivered when expected and his charges were very affordable. Also a very good communicator. Look forward to working with him in the future.

Regards.
Technology MarketRe: **Shop/Ship Gadgets/Fashion from USA or Great Automobile Deals from Canada by Javanian: 10:34pm On Jul 08, 2015
balogunsam:
Absolutely, yes you can.
How do i go about it? Category B most likely.
Technology MarketRe: **Shop/Ship Gadgets/Fashion from USA or Great Automobile Deals from Canada by Javanian:
TV/MoviesRe: Game Of Thrones Discussion (Beware Of Spoilers) by Javanian: 10:04am On Jun 09, 2015
Game of Thrones: Where a race of terrifying ice creatures who raise the dead are the least evil characters of the show
European Football (EPL, UEFA, La Liga)Re: Fc Barcelona Fan Thread: "més Que Un Club" by Javanian: 7:25pm On Jun 07, 2015
bykebyke:
http://m.goal.com/x/en/news/12491032

Rakitic Busquets Pogba


I cannot imagine. cheesy
Then what happens to Rafinha?
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Javanian(op): 12:16pm On Jun 01, 2015
TRADELYN:
Dear OP,

Keep the good work going.

We need the service of an expert in this field to aid some research projects in computer science.

Anyone interested should contact us.


Regard!
I'm interested, how do i contact you?
ProgrammingRe: Optimizations: Some Sketchy Rants by Javanian: 7:36pm On May 11, 2015
Sorry, for the Spam bot ban, I can't really say why it kept banning you (probably need some optimizations grin ) but i would try and monitor the thread to ensure it doesn't happen again.
ProgrammingRe: Optimizations: Some Sketchy Rants by Javanian: 7:33pm On May 11, 2015
Great post again! Just to add, Three address code also makes it easier to generate more abstract code, not bothering too much about things like register allocations, aids machine independent optimization and spots compile time error very easily. Forgive me if i am sounding finicky, I took a course on Compiler Design in school last semester so i just can't help it.
European Football (EPL, UEFA, La Liga)Re: Fc Barcelona Fan Thread: "més Que Un Club" by Javanian: 6:14pm On May 10, 2015
"For me, to watch Messi play is a pleasure – it’s like having an orgasm – it’s an incredible pleasure." - Luis Figo "Messi is the best in the world without any doubt and for me the history of football," Luis Enrique. "Once they said they can only stop me with a pistol. Today you need a machine gun to stop Messi." - Hristo Stoichkov "Messi or Ronaldo best player in the world? In the world, I would say Ronaldo. Messi is from another planet." - Turkish international Arda Turan "Messi is God, as a person and even more as a player. I knew him when he was a boy and I’ve watched him grow. He deserves it all." - Samuel Eto'o "Although he may not be human, it’s good that Messi still thinks he is." - Javier Mascherano "They tell me that all men are equal in God’s eyes, this player makes you seriously think about those words." - Football commentator Ray Hudson "Newton and Einstein had a certain level of autism - I hope that, like them, Messi surpasses himself every day and continues to give us his beautiful brand of football." - Romario "Messi is the Mozart of football." - Radomir Antic . "It is clear that Messi is on a level above all others. Those who do not see that are blind." - Xavi "There are three or four important things in life: books, friends, women… and Messi." - Portuguese writer Antonio Lobo Antunes "Barca will never have a player like Messi again. Messi’s greatness is present on and off the field of play." - Barcelona president Sandro Rosell "At this point I’m starting to believe that Messi is tightly related to Clark Kent." - Israeli model Bar Rafaeli "Messi is class. There is him, and then there is the rest. What he does is extraordinary." - Franck Ribery "We give him the ball and stand back and watch. People often say to me they saw Pele and Maradona play. In the future, I will be able to say I saw Messi play." - Thiago Alcanatara "He is always going forwards. He never passes the ball backwards or sideways. He has only one idea, to run towards the goal. So as a football fan, just enjoy the show." - Zinedine Zidane "He sees passes that most people can only see whilst watching the game on TV, not ones that you can normally see on the pitch." - Tata Martino "For the world of football, Messi is a treasure because he is role model for children around the world… Messi will be the player to win the most Ballons d’Or in history. He will win five, six, seven. He is incomparable. He’s in a different league." - Johan Cruyff . "I have played against Platini, Maradona, Cruyff and played with George Best — a lot of big names, but none of them has been able to do what Messi does. Two years ago I said that the best player I played against was Maradona and the best player I have played with was Bestie. But I can now say I have never seen a player as good as Messi. He’s in a league of his own." - Former Tottenham star Gerry Armstrong "Diego [Maradona] filled us with emotions. But between the cracks, without doubt, Messi is better than Maradona." - Diego Simeone "There is no doubt, you’re from another galaxy. Thanks Leo." - Maxi Rodriguez "Who is the Best Player in the World? Leo Messi. Who is the Best Player Ever? Leo Messi." - Arsene Wenger "I have seen the player who will inherit my place in Argentine football and his name is Messi. Messi is a genius." - Diego Maradona "I like Messi a lot, he’s a great player. Technically, we’re practically at the same level." - Pele . "Messi does not need his right foot. He only uses the left and he’s still the best in the world. Imagine if he also used his right foot, Then we would have serious problems." - Zlatan Ibrahimovic "Fella’s a genius. Best ever by a distance in my life time. Never really saw Pele… Souness, Gullit, Venables and now Rooney agree Messi is the best they have seen. He plays a game with which we are not familiar." - Gary Lineker "I played with Romario, Rivaldo, Ronaldo, Laudrup and Stoichkov but Messi is the best I’ve seen" - Former Barcelona and Chelsea star Albert Ferrer "It feels good to be in the same generation as him. I believe he’s the best player in the history of the sport." - Gerard Pique "Messi defies the laws of anatomy, he must have an extra bone in his ankle." - Argentina's 1986 World Cup-winning coach Carlos Bilardo "Who’s better, Messi or Cristiano Ronaldo? Messi. Ronaldo is good, but Messi is 10 times better." - Dutch star Klaas-Jan Huntelaar "Lionel Messi is quite clearly the best player ever. It’s a pleasure to pit myself against him and when I finish my career it’s something I can look back on and know I’ve tested myself against the very best." - John Terry "In my entire life I have never seen a player of such quality and personality at such a young age, particularly wearing the ‘heavy’ shirt of one of the world’s great clubs." - Fabio Capello . "Messi is better than Maradona; he is more complete, more consistent, more spectacular. He is reinventing the game – a mix of the real and the virtual." - Tostão "I am not crazy enough to compare myself with Messi because he is the best there ever was and the best there will ever be." - Mario Gomez "I was a big fan of Maradona growing up and of the current crop Ronaldo is good but Messi is the best I’ve ever seen. I don’t dish out praise lightly but Messi deserves it. I look for weaknesses in his game and I can’t find them." - Roy Keane "Messi is the best player ever. And this is said by someone who has seen Maradona and Pele play." - AC Milan chief Adriano Galliani "He is the best in the world. Football seems easy when he plays it." - Bacary Sagna . "I wear the number 10 Jersey for the US National Team in honour of the Greatest athlete I have ever seen: Messi." - Kobe Bryant "The only bad thing about Ronaldo’s life is Messi. If it was not for him, Ronaldo would be the best player in the world for five years in a row." - Felipe Scolari "I can’t believe anyone can have played the game of football as well as Messi." - Michael Owen "Is Messi a real player or a PlayStation character?" - Radamel Falcao "Messi is a genius. He has everything. When I watch him, I see a player who is very, very, skilful, very clever and his left foot is like Diego Maradona’s." - Franz Beckenbauer "Messi or Cristiano? Cristiano Ronaldo is very good, but I prefer Messi. He’s incredible." - Gheorghe Hagi "Comparing CR7 to Messi is an exercise of ignorance in football. Messi is Messi and others, footballers." - Spanish manager Miguel Angel Lotina "The other day I saw one of his games. He was running with the ball at a hundred percent full speed, I don’t know how many touches he took, maybe five or six, but the ball was glued to his foot. It’s practically impossible." - Real Madrid legend Raul "If he is so good, how can you express that? The superlatives ran out ages ago. On these pages, swearing has been tried. Or perhaps a symbol, something to signify that we have gone beyond words now." - Football writer Sid Lowe "Don't write about him, don't try to describe him. Just watch him." - Pep Guardiolayy
ProgrammingRe: Optimizations: Some Sketchy Rants by Javanian: 11:45am On May 10, 2015
Great post! Though i expected to see other optimiztion techniques like loop jamming and 3AC.

1 2 3 4 5 6 7 8 9 10 (of 57 pages)