« first day (1267 days earlier)      last day (3710 days later) » 

12:00 AM
ok. time to implement this stuff
gl man, ill be interested in what you find out
 
12:41 AM
ok, now i understand exception handling policies, its not what in eed
sihg
 
 
2 hours later…
3:08 AM
Hello guys, I'm a web developer, and i code in HTML, CSS, PHP and jQuery.
I want to start off in Software engineering now, and I wondering with what language to start off! Any suggestions?
 
@Hassan Start with Haskell. If you aren't a software engineer when you're done, at least you'll be a heck of a lot weirder.
In computer programming, SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the "first five principles" named by Robert C. Martin in the early 2000s that stands for five basic principles of object-oriented programming and design. The principles when applied together intend to make it more likely that a programmer will create a system that is easy to maintain and extend over time. The principles of SOLID are guidelines that can be applied while working on software to remove ...
 
user15026
@JimmyHoffa Is this a positive attribute?
 
Just memorize that. Completely. Repeat it to yourself 10 times every morning, and you too can learn to program in 10 years.
@AshleyNunn it's a Haskeller attribute
@Hassan what do you mean "Software Engineer" - if you write much PHP and jQuery you program, thus you are what most call a software engineer of sorts, unless you're not using any process controls and just writing code on the back of toilet paper, in which case it's not the language you should focus on, but rather the process control aspects of SE
Which means getting used to source control, and understanding how it works, controlled deployment techniques and approaches, testing methodologies, lots of softer skills. That's generally the distinction between programmer and software engineer.
It sounds ludicrous, but I suspect it would work. Though it wouldn't be dissimilar from hitting yourself in the face with a hardcover copy of the SICP until you know LISP
 
3:29 AM
@JimmyHoffa oops i meant software programming
 
@Hassan jQuery and PHP are software programming languages... you know how to do software programming if you know those...
 
@JimmyHoffa PHP is a back-end Web Programming language, and jQuery is a JavaScript based framework
 
You mean you want to do applications development?
 
Yeah.
I started off with Pascal, 2 years back in school.
I don't know much, just the basics in Pascal.
But, now I wa.nt to move up
*want
 
You could take a look at xamaron I think it's called
 
3:35 AM
(I
No, I mean like,
 
Sorry wrong language
 
Yeah.
 
There's a very modern pascal based language out there
 
C, C++, C#, VB,
 
supposed to be great
 
3:35 AM
Java.
 
@Hassan You can start with Haskell. It's give you a wildly different background in comparison to all your peers. And that won't be a bad thing. But nobody will be able to read your code.
 
@tylerl Hey! I resemble that remark!
 
You can start with Java, which will make you no smarter than your peers, but everyone will be able to read your code
@Hassan for reference, this is the language he's talking about:
 
@tylerl please talk in basic english I find your english difficult.
 
Nonsense! Everyone knows Agda is the language no one runs, they just compile it.
 
3:37 AM
Ok,s top.
If I was to say,
I have experience in OOP.
and a bit experience in C#.
and if I ask,
What is good, "Python, C, C++, C# or Java" based on difficulty to learn it.
 
user15026
@tylerl All I know about Haskell is that there is a book about it with an elephant on it, because one of my old housemates had it, or talked about it, or something.
 
Ranked easiest to hardest: Python, C#, Java, C, C++
 
Oh, so C# is easy?
Do you know C#?
 
@Hassan They're basically the same language. But then that's the Haskell talking. I agree with @tylerl's ordering.
 
Not compared to python
but compared to C++ EVERYTHING is easy
 
3:39 AM
Lol, rlly?
I'll learn C#.
 
user15026
As someone who is super new to programming, I keep getting told to start with Python, so I am assuming it must be easy.
 
Ok, I'll go for python then
 
@AshleyNunn yep. play with an online repl.
 
It can be used in web as well as Application Development right?
 
@AshleyNunn It was designed to be easy to learn. That point drove the syntax more than anything else.
 
3:40 AM
@AshleyNunn repl.it/languages
@Hassan People don't do much applications development with Python, mostly back-end serverside stuff like web apps and services and such
 
I see.
Does Python require a compiler or something?
 
It's still surprisingly powerful, but it religiously avoids unnecessary punctuation and keywords.
 
user20683
It sees a fair bit of use in games
 
Or is it like HTML and PHP.
 
@Hassan interpreted
 
3:41 AM
C# for desktop applications is a good go but that's wrong for you... There's a really good language I need to go dig up
 
Oh, it's interpreted like PHP and HTML?
 
user20683
it's compiled to a virtual machine
 
I dont get it, should I download a software like Visual Studios or something to run Python
 
C# is powerful, but it's heavily tied to Microsoft. Mono is a really impressive framework, but Miguel has his work more than cut out for him keeping up with an army of thousands.
 
3:42 AM
@Hassan if you know some Pascal, go use that language - it does desktop applications and mobile applications development
and it's a very advanced modern featured language just in the Pascal dialect
 
@JimmyHoffa I hate pascal, it has no User Interface.
 
@Hassan that's nice but what I'm talking about above isn't pascal, just the pascal dialect so it'll be easy for you to understand
but it's a full featured UI applications development language
 
And my IT Teacher said, Pascal is just used to train us how to implement algorithms in an actual programming language.
I see, but I wanna go for some language which I can use to do something.
Can you give me a like to
Compiler or something used to code in Python
Actually, I'll just try to learn C#.
I dont get it, should I download a software like Visual Studios or something to run Python
Can someone suggest me a newbie project in C#?
Like I know the syntax and basics.
(WPF)
 
@Hassan Go download visual studio express and create a new C# project and choose WinForms project
You can drag buttons into place etc on the form, double click them to bring up the dialog to enter code that will be executed when they're clicked on, and in the UI view where it shows the form you're building, click on things and view the properties pane looking at all the properties you can set on those controls
That'll get you started creating a program that has a windows form with buttons and things that can do stuff.
 
@JimmyHoffa I have Visual Studios 2013 Ultimate
 
3:51 AM
After that, go to this website and follow the tutorial: learncs.org
@Hassan great, use that
Have fun
 
I am trying to create a calculator
using C#
(I am not a total newbie, i have a little experience)
After I'm done, I'll show you the source
 
Just post it there when it works. When it doesn't work post it to:
 
Ok. :)
How to pass variables to another function in C# O_O
 
4:10 AM
Anyone here good with C#
 
err?
dont ask to ask just ask
 
4:26 AM
This is my code:
    public void Total(int num)
    {
        lblTotal.Content = Convert.ToInt32(lblTotal.Content) + num;
    }
    private void one_Click(object sender, RoutedEventArgs e)
    {
        Total(1);
    }
As soon as I click the btn named 'one' my program crashes.
I want to do this:
When user clicks the button 'one'
Then in the lblTotal, it should display one.
along with the other display
for example, the current reading is: "5+
When user hits "1" it becomes "5+1"
 
do you ever initalise lblTotal ?
and 5+ as a string is not convertable into an integer
 
@Hassan C# tells you why it crashed whenever it crashes. Read the stack trace and the error message.
 
hmm
an action doesnt return anything, which is the one that does
delegate?
 
4:42 AM
No idea what you guys mean, let me initiate lblTotal
It's all set fine, let me see the error message
This is the exception Details: System.FormatException was unhandled
_HResult=-2146233033
_message=Input string was not in a correct format.
HResult=-2146233033
IsTransient=false
Message=Input string was not in a correct format.
Source=mscorlib
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
 
i win! go me!
laughs
 
What?
 
think about what your trying to convert into an integer for a second
what is your string
that you are trying to convert
 
It's an object
I am trying to make a calculator
 
yes
you are trying to convert a string, to an integer
 
4:45 AM
lblTotal.Content = Convert.ToInt32(lblTotal.Content) + num;
 
so. what is lblTotal.Content ?
 
It's a label
It shows the total
actually
the screen
 
right. and you're trying to somehow convert that tooo....
 
I am trying to stick 'num' at the end of the lblTotal.Content
 
yes, we know the problem.
we're trying to get you to realise the problem
lblTotal.Content will be, a string.
 
4:47 AM
Ok,
 
you are trying to convert a string, to an integer
what does the string look like?
5+ ?
 
lblTotal.Content = Convert.ToString(lblTotal.Content) + Convert.ToString(num);
No, the content is totally empty
it depends on the user input
 
great
so, what does an empty string mean, when you convert it to an integer?
 
mmm
Infinite?
 
its an interesting question isnt it
 
4:48 AM
I got the 1 button working btw
indeed is
 
its also why you're getting an exception because c# goes. I HAVE NO IDEA!
 
lblTotal.Content = Convert.ToString(lblTotal.Content) + Convert.ToString(num);
 
and then, same question about say "5+"
 
what?
 
what does that mean when you convert it to an integer?
 
4:49 AM
F**** visual studio stopped working
i hate it when that happen
Matt D.
I thought,
To add the integer value of
num at the end of the existing value, I need to convert the existing value to Int, like the error suggested.
Ok, looks like I am doing well, now! :)
 
here's what I want you to do. I want you to think about the "types" of objects you're dealing with. And try and write your code so that when you add things, you add integers to integers.
you can then turn that into a string to display it
 
Oh,
 
and you can add bits of strings to bits of strings
 
I really appreciate your help on improving my logic.
I am mostly into Dynamic PHP, so I don't have this kind of logic xD
PHP is not strict with data types
 
but adding bits of strings to integers and hoping that the bits of strings are valid integers is going to be pretty ugly
even still, trying to turn "I AM A STRING" into a number php will also cause errors
 
4:56 AM
:)
I never defined types in PHP.
Only when there is a requirement of user_input
I just define, need: string or int
with c_type()
 
even if you didnt define types, there will be times when certain things are assumed
 
*ctype()
Yeah,
I got all the numerical buttons done.
Now, need the symbolic buttons done :)
bro
i got a problem with this
mathematical operators now
help me? :(
@MattD
 
hmm?
 
Matt
I am trying to
 
you're trying to turn some random string into an integer again?
 
5:04 AM
Do this:
    private void add_Click(object sender, RoutedEventArgs e)
    {
        Total("+");
    }
 
what does that even mean?
 
It should stick '+' at
 
Total takes an integer as a parameter
 
    public void Total(int num)
    {
        lblTotal.Content = Convert.ToString(lblTotal.Content) + Convert.ToString(num);
    }
 
why are you passing it a string
 
5:05 AM
So, when I try to do that
 
go back to what i said earlier, add integers to integers, append strings to strings
dont add strings to integers, and integers to strings
 
Error 1 The best overloaded method match for 'Calculator.MainWindow.Total(int)' has some invalid arguments c:\users\administrator\documents\visual studio 2013\projects\calculator\calculator\mainwindow.xaml.cs 78 13 Calculator
Error 2 Argument 1: cannot convert from 'string' to 'int' c:\users\administrator\documents\visual studio 2013\projects\calculator\calculator\mainwindow.xaml.cs 78 19 Calculator
78 13 would be this line: Total("+");
 
what does the error tell you?
 
I dont get any error, I get those errors.
The above.
 
what do those errors tell you
 
5:07 AM
I have no idea what it means.
 
then i would start by trying to understand what that means
 
It says, .total() has invalid arguments.
 
ok
so what arguments does toatl accept, it tells you
and what are you trying to pass to this function?
 
Ok, fixed it.
The problem was.
The + which I was trying to pass was string
And the total was supposed to accept int inputs
 
that was one of the problems. yes
 
5:10 AM
So, I changed it to string and now it works fine
 
that is not how to fix it
 
?
Then hw
I'll show you a screenie
of it workin
 
what you are doing. is trying to get a table into your flat. and rather than take the table apart, you've smashed a hole in the doorframe so it fits
 
ill keep repeating what i've been saying
add integers to integers
 
5:12 AM
I tried converting it to int
 
append strings to strings
 
oh
So you are saying
Have 2 arguements
One for string and one for INt.
 
thats one possible solution
you want to display the total of the operations
that total is, an integer
or a float. or whatever it happens to be
you want to display the operations requested by the user
 
Total() is a function
 
that will contain a mix of numbers, symbols, penguins
 
5:13 AM
It will only contain
numbers
 
5 + 10 ?
the + isnt a number
 
and
+ - * /
 
none of those are numbers
 
Yeah
Numbers and mathematical operators only
so,
I have one question
private void total_Click(object sender, RoutedEventArgs e)
{
int calculate;
int content;
content = Convert.ToInt32(lblTotal);
calculate = content;
lblTotal.Content = calculate;

}
My total doesnt work ;(
 
dont keep application state in the presentation of forms
ie: dont store your application data in controls, like labels
 
5:28 AM
What?
this is not a form, this is a WPF Application. :*
Can you suggest a fix for my above problem?
?
 
makes no difference
dont store your application state in presentation
 
Mmmm
*I see
mm
So how do I do that, suggest me a fix to your suggestion?
 
you have a variable, in your application, which is your total
and instead of converting the button to a string.
you use that
 
@Hassan is lblTotal.Content an Integer, or a String?
And assuming it's a string, are you trying to assign an integer to it? It certainly appears that you are.
 
6:08 AM
What?
i cant understand
lblTotal.Content is a string
It contains the equation to be solved
eg: 5+5
 
there is presentation
and there is data
you present the equation entered by the user as 5 + 5. how you store that in your application is up to you
you present the total of your operations to the user. how you calculate that, should be done using data stored by the application, not data stored in visible controls
 
I have no idea what you mean.
Please explain widely.
In normal language.
 
lets say that im playing CoD on the xbox
the position of my player is not deteremined by looking at the rendered output (or the screen) and asking it where in the world the player is
the game keeps data about where the player is. and when it renders things. it uses this information to generate presentation information
with your calculator. the total number so far, and what the user has entered should be stored in the calculator
they shouldnt be stored in the buttons on the calculator
 
6:46 AM
Recoding it
 
 
2 hours later…
8:25 AM
@MattD Just noticed what "normal language" means. Literally LOLed.
 
 
3 hours later…
11:14 AM
I asked this question
0
Q: How to manage focus for a small set of simple widgets

ChristophI'm developing a set of simple widgets for a small (128x128) display. For example I'd like to have a main screen with an overlay menu which I can use to toggle visibilty of main screen elements. Each option would be an icon with a box around it while it is selected. Button (left, up, right, down...

and I'm starting to doubt that this site is even the right one. Does it belong to stack overflow?
 
 
2 hours later…
1:21 PM
The Workplace has graduated, Beer has moderators. This is a good week for Stack Exchange.
2
 
1:44 PM
A few more graduations are coming - waiting on designs.
 
 
1 hour later…
user20683
2:54 PM
@glenh7 cough Scrapy cough
 
user41796
3:21 PM
@WorldEngineer True enough. I stopped short of saying "LMGTFY". If you look, there's a stealth comment on my answer to the effect of "this is too long for a comment"
 
user55340
3:34 PM
Whee! Snow day.
 
user55340
(yea for companies that allow you to work from home)
 
user55340
3:47 PM
@JimmyHoffa do you think you could give this question a shot at answering?
 
user41796
@Christoph You will likely get better answers for that question on Programmers than you would on SO. I think you're asking more about the design & concept as opposed to a particular code issue. I would recommend leaving it on Progs.
 
user41796
Wheee. More SE repz
 
user41796
2
Q: Connotation of term autodidact

GlenH7I would like to know if autodidact has a positive, negative, or neutral connotation behind it. These questions asking about usage imply: A neutral connotation: Autodidactic as a Verb What would you call a person who is not a student, but takes interest in exploring academic topics? Self-Lear...

 

« first day (1267 days earlier)      last day (3710 days later) »