« first day (631 days earlier)      last day (3390 days later) » 

12:00 AM
[retailcoder/Rubberduck] 3 commits. 0 issues opened and 0 closed
[skiwi2/GithubHookSEChatService] 0 commits. 1 issues opened and 0 closed
[Zomis/security-spr] 1 commits. 0 issues opened and 0 closed
[Zomis/GithubHookSEChatService] 10 commits. 0 issues opened and 0 closed
[Vogel612/testclient_javabot] 9 commits. 1 issues opened and 2 closed
 
Anyone around besides @Duga?
 
Is it a bad practice to specify arguments in an interface?
 
sample?
 
O! Hi @JeroenVannevel?
    public interface ISourceControlProvider
    {
        IRepository CurrentRepository { get; set; }

        /// <summary>Clone a remote repository.</summary>
        /// <param name="remotePathOrUrl">Either a Url "https://github.com/retailcoder/Rubberduck.git" or a UNC path. "//server/share/path/to/repo.git"</param>
        /// <param name="workingDirectory">Directory the repository will be cloned to.</param>
        /// <returns>Newly cloned repository.</returns>
        IRepository Clone(string remotePathOrUrl, string workingDirectory);
 
12:11 AM
mmm, I don't think it is no
but I'm not entirely sure how this propagates to other tools like intellisense or doc-generators
 
Yeah. I wasn't sure... It's a minimum requirement. Right?
So, I'm saying that any inheriting class has to at least create this one signature.
It can create other overloads.
 
wait
what do you mean with "specify arguments"?
I thought you were referring to the comments
 
    IRepository Clone(string remotePathOrUrl, string workingDirectory);
Like that. I'm not just saying the child class has to have a Clone method. I'm saying it has to have those parameters too.
I'm not sure that's smart.
 
oh
yes, definitely do the parameters
lol
 
But I'd have to right?
Okay. I'm gonna take your word for it...
 
12:14 AM
Otherwise you might as well not define them
 
Thanks. Much appreciated. I think I'm confusing myself. bbiab.
 
Kein problem
 
¤"("%()#¤/!#!="¤ undefined is not a function on you too, JavaScript
 
I'm reading through the C# LS on Attributes
So many niche things hidden in the language that I've never heard of
[method: MyAttribute] does something special
and [@MyAttribute] is also something special
 
@Mehrad I know Python reasonably well.
I have a fair bit of Python code on Github.
 
12:30 AM
@Hosch250 I assume you have learned it in the Uni. If not you might have suggestion for how to start learning it. As I said, atm, I am going through the tuts in their Docs page
 
@Mehrad Nope, not at all.
The stupid U only does JAVA.
I use SO and the manual.
Not guaranteed to be good practices, but it runs and for the most part is bug free.
Go ahead and look.
Supper's on now, see you.
 
@Hosch250, thanks . On it
 
12:54 AM
¤"()=%/((¤)=" JavaScript!
element.text().substr(someString + 1)
Don't call substr like that!
 
What does that first, unintelligible fragment do?
 
I don't even want to know what happens when you call substr with a String parameter.
 
Doesn't it find instances of the substring in a string?
 
substr is meant to take an integer and return a substring starting at the specified position
but I passed it a string instead of an integer -.-
 
Oh.
 
1:04 AM
Anyone good with Linux commands?
 
Not me.
@RubberDuck I just found your blog.
 
@Jamal depends on the command
 
You have the same Dawn to Dusk theme that I do.
 
@SimonAndréForsberg cut and uniq
 
I'm out!
I think cut removes some characters from a string
 
I assume uniq only takes unique strings
 
What's the problem, @Jamal?
 
I have a file with two columns, both separated by a tab character. I'm trying to print each unique string in the second column. I'm currently trying this, which isn't working: cut -f 2 moddeps.txt |uniq -c
It still gives me duplicate strings, and with a count of 1 for each.
 
not sure if it matters, but you're missing a space after |
probably doesn't matter, but still looks weird ;)
I am allowed to comment on any aspect of the code, right? :)
 
1:11 AM
I guess so. :-) I think that's how my instructor writes it.
 
is cut -f 2 moddeps.txt producing the output that you expect?
 
Yes
 
The second link is about uniq.
It looks pretty good, but I can't verify accuracy.
 
@Jamal then try to see if you understand the uniq command correctly.
have uniq receive input from something else than cut to make sure
 
0
Q: Haskell — Popping from a list in state while a condition is true

MatthewI'm dealing with data that stores its state as a String, treating the string like a stack. I also have to combine that with error handling. To that end, I'm using the type StateT String Maybe a. I have a function to pop and to push a Char from and to the string: pop :: StateT String Maybe Char ...

 
1:19 AM
My file contains all unique lines, so I've purposely added a duplicate line. After using just uniq, it does indeed count the duplicate line.
 
so apparently your assumption of uniq is wrong
@Jamal according to the documentation, it only filters out adjacent duplicate lines
is your duplicate line located far away from the other identical line?
 
No
 
are the lines really and truly identical, if you would look at them in a hexadecimal editor for example?
 
I have moved the duplicate line down, and it does show a count of 1 again. I must've missed that part of the documentation.
 
ok :)
TTGTB now (or rather, a few hours ago)
 
1:39 AM
@Hosch250 Oh yeah? I probably need to write something new...
mind if I ask how you found it?
 
A quick question for someone: am I allowed to use a bit of code I found in either SO or CR, put it my code, and post that code as long as I leave a link to the page where I found the code?
 
Thank you.
Just to double check that I read it right: when people post code or other things, they are agreeing that the people of SE are allowed to use that code in any way?
As long as they include credit
And retain the original license?
 
by posting anything to SE you agree to that, yes.
 
Thanks.
 
2:32 AM
Hello everyone
 
Hello, @Gemtastic
 
What's up?
 
Nothing much. How about you?
 
@Hosch250 hey thanks! (got a notification from WordPress) ... I need to get back to writing on that blog ;)
 
Just working on my project that needs to be turned in today >_>
Boy do I wish caffeine worked on me today
:P
 
2:36 AM
I love my debugger: Program received signal SIGSEGV, Segmentation fault. 0x08048074 in ?? ()
 
@JeroenVannevel If you code against an interface then you get the intellisense from the xml doc in the interface. That's where xml comments belong imo...
 
3:00 AM
@Mat'sMug Yeah I thought so too, I just wasn't 100% sure if intellisense did that
In retrospect, it wouldn't have made sense if it didn't
 
3:26 AM
For the first time ever, I just made a decision not to purchase a game based almost entirely on that game's community and not much to do with the game itself.
I was interested in this game Cities:Skylines. After the failure that was SimCity 2013, I was hoping this game would scratch my SimCity itch.
But then after seeing some screenshots and some dev videos... the game is almost an identical clone of SimCity.
So I went to the Cities:Skylines forums hoping to get some reassurance that the game was more than a direct clone... and after a couple reassuring posts, the thread became dominated by troll-posts by people who thought it was ridiculous that I even thought the games looked similar.
Look at those menus...
The only difference is that SC2013 is more polished.
And if you've played SC2013, you'll know that the actual game in the top screenshot looks very, very similar.
The only noticeable difference in that screenshot between Cities:Skylines and SC2013 is the grids by the roads... and I'd argue that if you turned on SC2013's debug mode, it'd probably look similar...
How about the pollution maps?
Those screenshots are from different games...
And I'm ridiculous for thinking they're similar?
 
@RubberDuck If you don't want people to find your blog, you shouldn't put it on your GitHub profile.
 
0
Q: Finding the number with the greatest number of divisors and lowest value

mohammedThe program is finding the number with the greatest number of divisors and lowest value. I have been working on it for about 7 hour and it keep saying "Time Limit Exceed", so I'd like to show me how to optimize it. I've written 2 programs for this: #include<iostream> #include<string> #include<

-1
Q: connect four game class

Lauren KorpaczEach class should contain: One or more instance variables. One or more of the instances variables should be assigned a default value. One or more functions that displays the value assigned to the instance variables. I want the class to be named Statistics

 
@CaptainObvious VTC - PRESTO!
 
@CaptainObvious I'm too tired to review this one. The poor formatting is a discouragement, though.
 
3:52 AM
@Hosch250 no. I want people to find it. I was just curious how you found it was all. It's good to know thanks.
 
I figured.
I get about 20 views a day on my blog. What is the average traffic on yours?
 
It varies a lot by day, but I get about 320 visitors a month. Around 450 views or so.
 
On average about 15 per day?
I can have below 10 somedays, and over 50 others, but I typically have 18-22.
 
Yeah. About that. It's more after I write something new.
 
You know how I got mine up that high?
I started a Bing Webmasters account and linked my blog, and every once in a while I tell them to update the sitmap.
 
4:06 AM
Eh. People will find it or they won't. I do it for me. I do check up on Google's webmaster tools from time to time though.
 
I also used to be on the Microsoft help forums a ton (actually, I'm still a Wiki author there).
 
Those stars helped me realize that people want Git integration for VBA. It pushed a nice to have feature right to the top of the list.
 
I wrote articles about the most common problems and linked to it in the response.
 
s/stars/stats
I've done that a little on SO when a good answer would be way too long. Give it the cliff notes version there and point back to the full explination on my blog
 
Hope you don't get flagged for spam, then?
I suppose you write a good enough answer that it doesn't.
 
4:14 AM
People are way to quick to call things spam. If you write a legit answer and the link is relevant, there's nothing wrong with it.
 
I know.
Like the comments say - use the link for reference only.
 
Sorry. Button issue for me... I've not had anything flagged. It just bugs me.
 
See you.
 
4:32 AM
0
Q: Dealing with Question with no answer

f.rodriguesThe Help page suggest that if a question received no answer the poster should: Edit the question to provide status and progress updates Document continued efforts to answer the question Offering a bounty I opened this question, I think it has all the qualities of a good question It's on top...

 
@Hosch250 what does that `\` is doing there?
print("""\
Usage: thingy [OPTIONS]
     -h                        Display this usage message
     -H hostname               Hostname to connect to
""")
removing it gives me the same result and I simply don't know what's it doing :)
Sorry... found out what. It was to cancel the extra line to start with caused by end of line
 
4:50 AM
@200_success Abstraction is more about taking common functionality out of multiple concrete sub-classes and putting it into a single common abstract class instead and using inheritance (or something similar) to have that common functionality refer to the single abstract(keyword in java) class Please correct this definition, if am wrong. Because I see your interpretation of abstraction a bit different in your answer, which I need to understand. — overexchange 3 mins ago
@overexchange Where did you get that definition from?
 
0
Q: ask if letter is part of name and if not letter is put into list of wrong guesses

Juan Battiniso these are three methods that are part of a bigger program. alg1 asks if a random letter between A-Z are part of your name, if its not it is put into an arraylist of wrong guesses to keep of the wrong guesses to avoid repetition. However, I have two problems with this, 1) when I press no, the d...

1
Q: First data checking class PHP

Victor TelloI'm starting to learn OOP with PHP, all I've learned so far is just by searching and reading. So I have this need to check input data for certain things, like, min of chars, max of chars, spaced or not spaced, just letters or not. So far I've just created the alpha() method wich is just for lett...

 
5:28 AM
0
Q: Efficient way of finding perfect squares?

user3575018I was trying to solve a problem which needed you to count the number of perfect square in the given range. This is the code I have written in C. #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int isPerfectSquare(int x) { float s = sqrt(x); if (fmod(s,1) ==0...

 
5:46 AM
0
Q: Why does this implementation of Dijkstra's algorithm work in O(n^2)?

Dhruv MullickHere is the code I use for implementing Dijkstra's algorithm. Consider a graph with n vertices and m edges. Shouldn't it run in O(n^2 m) ? Someone may say that there are n vertices and each edge gets processed once, therefore it is O(nm). But the while loop can run at most n times, the 1st for lo...

 
^ needs migration?
 
6:31 AM
0
Q: Quadratic Calculator

PALADIN 458SI am about a month into learning Java and I'm just looking for some comments on my code. Specifically, I would like to know if I'm being as efficient as I can be. This is the most complex thing I've come up with so far (that works) and I wanted some feedback on my developing coding style. Than...

 
6:49 AM
@CaptainObvious I've finally got another review in.
 
7:15 AM
hai
@200_success I got this definition from one of the user from programmers.stacexchange.com
here is the chat message that i documented for the same...
Abstraction is more about taking common functionality out of multiple places and putting it into a single common place instead and using inheritance (or something similar) to have that common functionality refer to the single class

'class Object' doesn't really have any abstraction to it. It is something there because everything needs to inherit from object and there needs to be some base functionality (equals, hashcode) to make the system work.
Note that Java's class hierarchy isn't about abstract classes in most cases, its about interfaces.
 
in The Whiteboard, Nov 20 '14 at 1:44, by Matt Giltaji
abstraction is more about taking common functionality out of multiple places
That sounds like a rather bogus definition of abstraction to me.
 
That discussion looks like it's more about abstract classes than abstraction.
Different meanings for the similar words.
Java just happens to call classes that cannot be instantiated due to incomplete implementation "abstract classes".
 
Abstraction is hiding the details of how something is done this could be complete definition. But for me, am able to interpret very vaguely despite you gave a+b example. In my query, you said: the abstraction is weak. I need to understand this comment, why it is weak? i mean, where did i not hide the implementation details? may be, this will make my life easy.
 
In computer science, abstraction is a technique for managing complexity of computer systems. It works by establishing a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level. The programmer works with an idealized interface (usually well defined) and can add additional levels of functionality that would otherwise be too complex to handle. For example, a programmer writing code that involves numerical operations may not be interested in the way numbers are represented in the underlying hardware (eg. whether they're 16 bit or...
vs.
In object-oriented programming, a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature. This concept is an important part of the polymorphism portion of object-oriented programming (OOP). == Purpose == The concept of the virtual function solves the following problem: In object-oriented programming, when a derived class inherits from a base class, an object of the derived class may be referred to via a pointer or reference of the base class type instead of the derived class type. If there are...
(see section on "Abstract classes and pure virtual functions")
Just a second… taking another look at your code.
 
7:31 AM
ok
 
Monking!
 
So, let's look just at your TicTacToeGame class.
 
monking
 
Context, for anyone else following along…
5
Q: Does this Tic-Tac-Toe game follow abstraction and encapsulation?

overexchangeThis below program will be further enhanced for TicTacToe game with Human and Computer as players. Currently this program is written for choosing best move for a given grid position. package project2.tictactoe; enum TicTacToe{ X, O, NULL; @Override public String toString(){ ...

Let's consider just the "public" interface, because that's what matters in an abstraction — how others interact with the class.
You haven't made anything public.
boolean gameDone() is, in principle, a reasonable idea.
(better renamed to isGameDone() — that's a convention for methods that return a boolean)
byte chooseBestMove(boolean side) is problematic.
That's where the "monster class" problem occurs.
What, exactly, is a TicTacToeGame?
 
7:40 AM
When you say: You haven't made anything public., which method in TicTacToeGame class is deserved member to have public access?
 
Maybe it's easier to look at the proposed solution in my answer instead.
 
TicTacToeGame has to facilitate a human to play a tictacto with computer
 
OK, but where is your human? Where is your computer?
 
My query mentions that: Currently this program is written for choosing best move for a given grid position.
 
Maybe it does accomplish that. But without much abstraction.
So, in my solution TicTacToe stores the board state, and it codifies the ground rules of the game:
e.g. Two players. Players take turns. Each player makes one move, which must be on an unoccupied square. First to get three-in-a-row wins.
 
7:45 AM
Actually it make sense to divide the program into multiple classes as mentioned in your solution, but for me it is more important is to understand what is driving you to think like this? Is it SRS principle in OOPS or abstraction?
 
All of the above.
… plus experience.
In OOP, it usually helps to describe what you are modelling, in words. Then take note of the nouns you use in that description.
Board. Human player. Computer player.
 
(If you wanted to get fancy, Strategy too. Let's not go there for now.)
Then, ask yourself, what should each of those nouns be capable of being asked to do?
For board state, you should be able to ask,
whose turn is it?
who has played on square (x, y)?
For a player, you should be able to ask, given this board state, where would you like to play next?
what's your symbol?
It does not make good sense to be able to ask the board where the human player's next move will be.
How about a chess game? What objects (nouns) might you have in the model?
 
To enhance as chess, I think you need an extra super-class for Board, which TicTacToe or Chess would inherit
 
8:00 AM
Let's not try to reuse code between the two games for now. =)
What else?
 
abstraction is visible in your solution because for every subclass that implements interface Player we are hiding the details of getMove() strategy from the users using that method. In my program, I don't know what abstraction means. This is where am confused. As you said above: Maybe it does accomplish that. But without much abstraction. What does that mean?
 
"Without much abstraction" is another way to say "too many low-level details getting in the way".
 
can u give me one example as per my code?
 
For example, when making a move,
if(side == TicTacToeGame.COMPUTER_TURN){
     this.twoDimArray[i/3][i%3] = TicTacToe.O;
You shouldn't have to think about div 3 and mod 3.
That's mental clutter.
 
for that piece of code, leaving others, How would you rewrite that code?
 
8:04 AM
You shouldn't hard-code the fact that the COMPUTER_TURN means the O symbol.
Well, an improvement might be to write, somewhere in the ComputerPlayer class,
board.makeMove(x, y);
Or, in my version, I've inverted the control, so that the game class asks the player where his/her/its next move should be.
That's currentPlayer.getMove(this, rowCol);.
Note that a lot of details are not mentioned.
It doesn't care if the player is human or computer.
It doesn't care if it's a human playing against a human, human against a computer, or a computer against a computer.
It doesn't care what the symbols are. Could be *. Could be ☺ .
It doesn't care whether the board stores its state in a two-dimensional array. (In fact, it doesn't. It just pretends to.)
All of those "don't know, don't care" statements are indicators of good abstraction.
 
something like this in Ocean class ?
 public Ocean timeStep() {

    	Ocean nextTimeStepSea = new Ocean(width, height, starveTime);

        for (int row = 0; row < this.height; row++) {
            for (int col = 0; col < this.width; col++) {
            	Critter creature = this.cellContents(row, col);
                nextTimeStepSea.addCritter(creature.update(this));
            }
        }
        return nextTimeStepSea;
    }
creature.update(this); // i got this style due to poly
 
Specifically, creature.update(this).
 
yes yes
you got this style, because came up with Player interface
otherwise it was not possible, i see that.
as you said, the if elsif checks were there in Ocean class, because of same problems. later we resolved this issue with poly
 
8:21 AM
To be clear, polymorphism is not the only way to make abstraction useful, but it is one good example.
 
so basically it is not board's responsibility in getting in the details of who is playing the current move to decide what to set on board, which is breaking abstraction.
 
That's right.
 
and that is what you mean by this wrong code.
if(side == TicTacToeGame.COMPUTER_TURN){
     this.twoDimArray[i/3][i%3] = TicTacToe.O;
oh ok
 
Right. It should never have been in the board class in the first place, and furthermore it is cluttered with too many details.
 
so getMove() of corresponding player is taking care of that details. OK
 
8:24 AM
@overexchange are you interested in reading books to understand class design / abstraction / encapsulation / information hiding better?
Chapter 6 in Steve McConnell's wonderful Code Complete would be perfect for you
 
@janos i followed 200_success approach in my previous [program] (codereview.stackexchange.com/questions/68481/…). Reading books will make me understand better after making such mistakes in my current code oriented course. I feel, Getting a feel of OOPS paradigm can happen only thru programming course like cs 61B.
 
it's widely recommended to think and plan first before writing code
I followed your long discussion above, and I believe the specific chapter I pointed out for you will really clear up your mind, give you a solid foundation and set you in the right direction.
 
Ya, May be I did not think and plan before writing this code. In my previous program, I did the same and then refined with all good ideas. because this is not production code.
Sure, i will go thru this book
 
oh the book is 1000+ pages
 
@200_success I got into same issues with my Ocean class if you remember, where i had lot of if-else blocks which is corrected. I think i made the same mistake here, but this time i realised that it is bad abstraction
 
8:34 AM
if you're impatient just jump to chapter 6: abstract data types
time to get breakfast, bbl
 
@200_success this is how i planned to write the code before start writing... this is the reason i got in to such bad design code, because here in this pseudo code i was thinking of logic implementation, i did not think about, What objects (nouns) might you have in the model?
/* pseudo code (yet to be written in Java)*/

  X |   |
____|___|____          (side = 0) mean HUMAN_TURN
  O | X | O            (side = 1) mean COMPUTER_TURN
____|___|____           +1 is Computer's best possible score
  X |   | O             -1 is Human's best possible score
    |   |

	/*2D array should be in heap, because multiple
	activation records need to modify the same array.*/

String Best_move;
int Best_Score;
public  int chooseMove( boolean side){



	if(is the game Done?){
		if( side == HUMAN_SIDE){
 
Well, that's a very procedural way of thinking.
 
the same imperative programming approach ):
 
yes.
Remember when I recommended the CS 61A curriculum?
 
I mean, there are two things i need to take care. (logic implementatiom + What objects (nouns) might you have in the model?)
cs 61A - funtional programming using python
 
8:45 AM
There's a reason why CS 61A comes before CS 61B.
 
what is that?
function as abstraction?
 
Basically, to break the habit of imperative programming.
Yes, that too.
 
yes, I agree it is the habit. i don't think it is too hard to think in a way you suggested me .
 
How would you describe your level of mathematical background?
… say, with finding roots of smallish polynomials?
… or taking the derivative of a polynomial?
I'm not asking you to solve one for me right now, I just want to know if you have been exposed to those concepts before.
 
I had been thru Algebra section from here and i specifically learnt the meaning of derivate and integration from gilbert strang course ocw.mit.edu/resources/…
 
8:53 AM
OK. That might be good enough.
Here's an example of some code with minimal abstraction.
6
Q: Newton's method to solve cubic equations

Satwik PasaniI have used the Newton-Raphson method to solve Cubic equations of the form $$ax^3+bx^2+cx+d=0$$ by first iteratively finding one solution, and then reducing the polynomial to a quadratic $$a1*x^2+b1*x+c=0$$ and solving for it using the quadratic formula. It also gives the imaginary roots. def de...

 
derivative is rate of change
 
It happens to be , but don't let that bother you.
That reminds me of the kind of homework problems that would be in CS 61A.
The material should guide you towards something like my answer. Developing abstractions such that you can write elegant expressions like polynomial.derivative().
 
ya i think, def solvedeg3equation() was written in imperative style.
 
Well, Python is always going to be imperative, but abstraction can help a lot.
to avoid things like g=g-deg3(a,b,c,d,g)/(3*a*g**2+2*b*g+c)
 
actually crux of cs 61A is Building abstractions , which I did not feel the meaning of it while completing the homeworks of CS 61A
 
9:04 AM
Yes, that is one of the key themes of the course.
 
0
Q: Converting array of bytes to the hex string representation

MeysamIs it possible to make the hexStr function faster? #include <sstream> #include <iomanip> #include <stdio.h> std::string hexStr(unsigned char* data, int len) { std::stringstream ss; ss << std::hex; for(int i=0;i<len;++i) ss << std::setw(2) << std::setfill('0') << (int)data[i]...

0
Q: C++ My first oop game-TicTacToe (beginner)

MarkoThis is my first that i used classes. How could this be improved? #include <iostream> class TicTacToe { char m_field[3][3]; char sign; public: char Sign(char x) {sign=x;}; void MakeField(); void DrawField(); bool IsFree(int...

 
Hey, maybe you should review that Tic Tac Toe. =)
 
I think that is the only theme of this course.
yes yes right thing to do
hahaha
But the question there is not to review from programming style ):
C++ syntax neither support OOPS nor functional, i saw this while doing multithreading in C++11, where we pass functions to Thread class in C++11
new Thread(&newThreadFunc);
 
C++ is definitely object-oriented, unless you choose to not use it that way.
 
9:10 AM
@200_success My advice to beginner like me, would be to be away from C++ language.
 
Good idea. =)
So, you've been presented with several suggestions.
Janos recommends reading Code Complete.
I suggest taking a look at CS 61A — which should in principle give you more guidance and exercises.
A variant of that approach is to read the classic textbook Structure and Interpretation of Computer Programs, which is the book used in the old CS 61A curriculum before it changed from Scheme to Python.
SICP will break you out of the imperative programming mindset, guaranteed!
This part of SICP is basically my answer to the cubic equation question.
 
Going thru the right course and getting the right feel about the crux of this course are two different things. As a slow learner i never thought about abstraction on these lines when doing cs 61A homework,
Like i made the code change creature.update(this); but did not know the impications behind making it, except feeling that it is more readable. honestly!!
 
0
Q: Schema.org combining different categories: code check

JulienThis is the follow up version of a previous question on combining different categories and their properties. The home page contains the overarching company information. The product page contains product information and links to the home page. I do not get any error messages in Google testing to...

 
@200_success I do not know, how I would make my thinking approach, when i follow prototypical paradigm in client side programming using javascript/CSS after completing this course. What would abstraction mean in proto paradigm?
 
The interesting thing is, JavaScript is actually heavily influenced by LISP.
It just happens to have a Java-like syntax to make it palatable to most programmers.
So, to be a good JavaScript programmer, it actually helps to learn LISP / Scheme.
Abstraction is a powerful concept that goes beyond object-oriented programming.
Everything in computing is possible because of abstraction. It's what saves you from having to worry about which transistor is doing what.
 
9:27 AM
while performing functional programming using python or OOPS using java, i know what abstraction mean, But in proto paradigm in CSS(say), what is abstraction?
 
CSS is a rule-based system, not meant for general-purpose computing. Let's leave that out of the discussion.
In JavaScript, sure, abstraction helps too.
It's still object-oriented, it just doesn't use inheritance the way Java does.
Example:
11
Q: Monopoly game cards

Elton FrederikThis functionality is for a Monopoly board game. In particular, when the player lands on Chance or Community Chest, a random card is drawn with a particular set of instruction, a bonus could be paid out, or perhaps the player is fined. The two cards are different in that one is a set of 16 cards...

 
i was talking about proto type inheritance youtube.com/… mentioned here
 
What about it?
 
Is this just a feature of javascript? which has nothing to do with abstraction?
 
Prototype inheritance, you mean?
 
9:35 AM
yes
 
0
Q: php webservice script need some input from experienced folks

siviHi I wrote this code for android server interaction. the way I built the client was an onSharePreference of strings includes photo encoded to a base 64 String object {imei , barcode0, barcode1, photo0, photo1, time_taken0, time_taken1,..} because I had the possibility the user won't be connected ...

 
Sure, abstraction is still desirable and possible in JS. It's just that you don't write class Foo extends Bar in JS.
 
ok
when you say to be a good JavaScript programmer, it actually helps to learn LISP / Scheme. Do you mean, we build abstractions in the form of functions in javascript?
 
Yes, you could say that.
function makeIncrementor(amount) {
    return function(x) {
        return amount + x;
    }
}
var addThree = makeIncrementor(3);
addThree(5);
^^^ an example of the LISPish nature of JavaScript.
makeIncrementor is a function that returns a function.
That returned function has a notion of "+3" embedded in it.
You could imagine a function that has a notion of "my symbol is X" or "O" embedded in it.
 
9:51 AM
so, functions are first class objects in javascript?
 
Yes!
 
I did such functional programming using python in cs 61A
 
Excellent. How far did you get?
 
As of now, this is the status.. github.com/shamhub/CS61A_Fall2012
 
Looks good at first glance.
 
9:59 AM
python memory model of loading and running modules made me get out of this course. global scope/local scope/under the hood working of "import of modules"/.. this made me overloaded to go thru cs 61B parallely.
 

« first day (631 days earlier)      last day (3390 days later) »