« first day (1265 days earlier)      last day (4023 days later) » 

user55340
20:00
> Juggling eggs:
Keeping a lot of state in your head while modifying a program. “Don't bother me now, I'm juggling eggs”, means that an interrupt is likely to result in the program's being scrambled. In the classic 1975 first-contact SF novel The Mote in God's Eye, by Larry Niven and Jerry Pournelle, an alien describes a very difficult task by saying “We juggle priceless eggs in variable gravity.” It is possible that this was intended as tribute to a less colorful use of the same image in Robert Heinlein's influential 1961 novel Stranger in a Strange Land. See also hack mode and on the grip
user55340
@GlenH7 ohh... I like how there are quotes in this one...
user55340
0
Q: "Engineer" vs Programmer

user120547I'm towards the end of first year and I'm studying Software Engineering at the University of Waterloo; I'm in the midst of midterms and I'm thinking if this is really worth it. I know kids that are younger, or even my age; that know how to program better than me, and know a lot more about progra...

Ah, a question from the school that teaches software engineering instead of software engineering.
user41796
What do you do with suggested edits like this one? programmers.stackexchange.com/review/suggested-edits/53945
@GlenH7 Personally? I'd reject.
user55340
20:04
reject, anon changing too much. They have a registered account, use it.
That's not an edit, that's a brand new answer. Perhaps a derivative answer, but a new answer.
user41796
I have seen where new users screw up an edit because they return anonymously. But it makes sense that they can come back as themselves and fix the issue.
So, the 5S police came by my cube today.
user41796
@MichaelT I sympathize with their plight, but am forced to VTC as OT -> career | education
user41796
@ThomasOwens how did it go?
20:07
Apparently, having books horizontal is a bad thing and they want me to move them to a different wall mounted plastic holder. However, it's very unsecure to hold the weight of books, plus having books in two locations would break my 5S score.
So I'm choosing to ignore them. If they don't want my books to be horizontal, they can give me a bigger cube.
user55340
Ask if you can annex the next cube too.
user55340
"I claim this cube in the name of 5S and vertical books on a bookshelf."
Dude. I could.
It is vacant. I could just lay down some tape on the desks and be like "I hereby declare this to be the regional book cube!"
user55340
Thats a pretty thick book to be a cube.
Anyone have any experience with this kind of voodoo? I've been tempted to do the same in the past, but have never seen anyone use this pattern in practice.
user55340
20:10
user55340
We are loquacious of borg, you will be read.
If someone can tell me how to give that guy chat rights in here, I'll do it and leave a comment.
user41796
@ThomasOwens He has to actually enter a chat room first so he gets registered with chat.SE
user41796
once he does that, you can right click (or something) his account and give him permissions to chat
user55340
20:12
user55340
> Even when this room is read-only or their reputation is too low, these users will be able to talk in this room.
user55340
But, they need the chat account first.
@JimmyHoffa Guys in class got a chuckle out of that
@user120547 If you would like to join us in chat, I think we can give you ability to talk in here. We're nice people like that.
(Maybe that will work?)
user55340
Even the "engineers"
user41796
20:13
@ThomasOwens super ping only shows up with a single @ sign? Didn't know that.
I do all kinds of interesting things with lambdas in C# and find them helpful in abstracting creational tasks, but I avoid factories as a habit.
user55340
I think that Glen's comment will do it, if he follows the link.
user55340
In which case we'll see him show up in the people in the room... if he does it right and signs in.
user55340
Or something.
user41796
@MichaelT I have seen low rep users enter the room, obviously they weren't able to chat.
20:15
how much rep does it take to talk?
user55340
@GlenH7 Correct, but once they enter the room they have a chat account and then we can add it to the access for the room.
user41796
@Ampt 20 so 4 up votes on the question
user55340
@Ampt 20
2 down 2 to go
aaand he has 20 rep
This proves that the rep to chat (and comment) is broken. He deserves the ability to use our tools.
user55340
20:16
There's the 4th.
user55340
(and I have one vote left for the day)
user55340
@ThomasOwens Blame the spammers.
user41796
@ThomasOwens Or we just need more mods & room owners. :-)
user55340
Being able to force create an account or grant comment privs on a per case basis though...
user41796
@user120547 - welcome!
user41796
20:17
@Dr.Elch welcome as well
user41796
@user120547 - generally speaking, hang in there
user41796
There are several engineers (and non-engineers) in this chat room.
user55340
(and context for @Dr.Elch 's visit)
user55340
4
Q: How to teach pointers to beginners in C?

Dr.ElchI'll hold a little presentation about C-Pointers in a small group of people with beginners programming skills, with no CS background. Just people who would like to learn something about coding and prefer a practical hands-on approach. In fact, they are using the C-Language to do so. We are about...

@user120547 I'm in my 5th year of uni so I know where you're coming from
user55340
20:18
@GlenH7 You're getting this one?
Hi. Yes, that question is why i'm here :-)
user41796
Engineering can be a hard path to follow, but if you enjoy the work then it's worth sticking with. And you will likely have opportunities to pursue that your non-credentialed friends won't be able to do
user41796
@MichaelT Oh, I was in favor of the community process. Lord knows I like listening to my opinion, but there are other valuable opinions in here too
Many, many opportunities
user55340
Oh yea... 20 rep. That works too.
user55340
20:20
(and I quietly close the room access window...)
user41796
@MichaelT at some point we'll need to nuke the question so you might as well put the user handle in there
user55340
> So I am wondering, how would you approach this topic to make it fun and interesting? Do you have great examples that really help people to understand the concept of pointers?
user41796
@user120547 - you asked "What if we end up working similar jobs as well " and that's a mighty big presumption. I have worked a wide range of roles, and my engineering background has consistently opened more doors for me. Case in point would be my current gig where they hired me to program specifically because of my engineering background.
user55340
@GlenH7 Hmm... (its not likeing it... maybe a mod? @ThomasOwens ?)
user55340
And chat syncs slow from network rep.
20:23
@Glen apress sale still ongoing? They actually have a clojure book I'd be interested in
user41796
@MichaelT that's a good point. @ThomasOwens, @AshleyNunn, @RobertHarvey, @Noctrine - would you add @user120547 to the access list for this room?
user55340
Room dropdown (above icons), controll access, add access, paste 'user120547' into search, select write access, click 'change'.
user41796
Did I miss any of the mods in here?
user55340
For me, it comes up with a warning of 'users must have 20 reputation to have write access'
user55340
(sorry @Dr.Elch - minor administration stuff fixing up at the moment)
20:24
Room owners can do that glen, but the user needs a chat.SE user first
no worries :-)
user41796
@JimmyHoffa he's in the room now and MichaelT just tried, I thought
user55340
@JimmyHoffa He's got an account - the rightmost busy brown gravatar.
user55340
(bit overkill there...)
20:25
Just temporary.
user41796
@user120547 - now you should be able to chat...
user41796
@RobertHarvey thanks!
Hi, I'm that kid that asked the question lol
user55340
If it works.
user55340
And it does.
20:25
Apologies haha i couldnt find a general chat section
and i didn't want to ask on yahoo answers because you don't know whos gonna be answering on there
Leave it to the old access hand to come up with the temporary hack we didn't think of
Get to the point, please. :)
user55340
@user120547 we're a good bunch here.
user41796
@user120547 As a new user, you wouldn't have been allowed in until you earned 20 rep on the site. We jiggered the rules to make it work.
LOL thank you, so yeah whats the difference between a Software Engineer with an engineering degree, and a programmer
> Just make him a super user, that should fix it
a lot of technical knowledge (most of the time)
user41796
@user120547 range of opportunities that you can work on
Uhm. I think I stomped over someone else. If you can still chat, please say something?
user41796
Especially if you end up getting licensed as a software engineer
because I seen some people without Engineering or Computer Science Degrees that are really good at programming get better jobs
user55340
20:27
@Dr.Elch thinking about your problem... Pointers are tightly coupiled to arrays making it difficulty.
well would you suggest introducing arrays first?
user41796
@user120547 programming is certainly a meritocracy - so the talented folk will / should rise up to a degree
@user120547 For one thing, it depends on the company. If you don't have a degree, good luck getting into aerospace, medical devices, automotive...
Yeah, there's something wrong with the popup menu, there.
user55340
20:28
I'd start with static sized arrays - the on the stack...
user55340
and then ask the question of "what if you don't know how big the array will be at the start, how do you solve that?"
OK, that was weird.
Oh okay, but why is the school teaching you extra stuff about physics, chemistry, and circuits if all you're going to be doing is coding (i know a lot of schools that do this)
user55340
That leads you to malloc (and free).
It varies highly. Some believe an engineering degree focuses entirely on process management and control topics and is extremely weak technically. Occasionally but rarely true, though the point is terminology is VERY non-uniformly applied in this industry
user41796
20:29
@ThomasOwens And other fields show a heavy bias in the credentials they want to see for their candidates
@user120547 Because you need domain knowledge to be an effective software engineer.
true, i could actually do that.
It's not enough to just write some code.
You have to write code that models real-world things.
user55340
@user120547 writing code is the easy part.
user55340
user41796
20:29
And the better your engineering skills, the better able you are to model the real world
@user120547 I made a comment about this before you joined the room. You should pick up a copy of a Steve McConnell book called "Professional Software Development".
and I'd have a more defined application for pointers. I really want to avoid too much abstraction
I have a degree in Software Engineering, but I didn't have to take physics or chemistry (I took two quarters of physics and a quarter of chemistry, though, but others took biology and more recently, image science became a valid course).
user55340
@Dr.Elch The other approach... would be an old school pascal-ish approach and the problem of "what if you want to change 3 variables at once"
OK that makes a lot of sense now. So as a software engineer, you work on relating real life practical stuff to software..... makes sense
user55340
20:31
You can't return them all back with a single function (without structures, but that leads to later topics)
you mean like "oh why can a function only return 1 value"?
right
user55340
So you make a procedure that takes the address of three parameters and modifies them.
user55340
And then that leads you to pointers.
@user120547 True. It also depends on your school's emphasis. McConnell denoted two types of software engineering programs: software engineering and software engineering. His two examples were actually your university (Waterloo) and mine (Rochester Institute of Technology).
user41796
@user120547 whereas I have both a BS and MS in non-traditional engineering branch along with a minor in electrical. I took 2 years of physics, 2 years of chem, and some biology.
user55340
20:32
The concern there is that thats not... best practice... its sometimes necessary, but not the best thing.
yeah i guess my school focuses more on the engineering aspect instead of the software aspect
You know, my first real industry experience with a programmer was modifying his tester code. He was writing a test for an embedded system. On this specific system there are 20 high voltage outputs. One of the big parts of this test is to ensure that when you turn one output on, none of the other ones react to it: each has to be independent of the others. So that was his goal. You know what he did?
Wrote one test, then copy and pasted it 19 times, then went through and changed the numbers. It was ugly, but it worked.
user41796
@Dr.Elch I think it requires a balancing act between abstract in order to wrap your head around pointers and then concrete examples to show how it all works.
the second approach would focus more on the true character of pointers, which handles stuff in other places, while the array approach may let to the assumption that a pointer is merely an instrument on such structures
okk stuff is starting to make sense now, Thank you guys so much :) I feel a lot better now knowing that what I'm learning is actually leading to somewhere
user41796
20:33
@user120547 Not a bad thing. I work with a mechanical who understands thermo really well. We do Energy work, so it makes sense and helps him model our clients' problems.
user55340
(btw, you do see why chat works better for these types of questions? - both career questions and the broad 'how to do...' ones?)
Whereas you take things like physics and chemistry and other hard-engineering courses, I took software process courses, product quality courses, economics courses...
user55340
A lot of this requires a dense back and forth conversation that Q&A or comments don't do well.
user41796
@ThomasOwens And I'll admit I suffer a bit when it comes to my algorithms and other fundamentals. A lot of that I had to learn after the fact to make up for the lack.
yeah thomas yours makes more sense, i like your curriculum better :(
20:34
i do actually. :-) not sure why i hoped for a clear answer to that question ^^ i had a lot of trouble to figure out which SO Board I should use, since it became so fragmented
@user120547 It's not better. It's different.
yes, i have a stackexchange account already with like a few hundred rep, its just i didn't want people seeing my name asking such an embarassing question
user41796
@user120547 so long as you feel inspired to tear things apart and understand how they work, you'll do well. You should never stop learning from that point of view.
user55340
@Dr.Elch In pascal, we had the 'var' parameter: wiki.freepascal.org/Variable_parameter
@ThomasOwens I have a pretty solid mix of both. you didn't have to do any physics or chemistry?
user55340
20:35
Which dealt with pass by value vs pass by reference.
yeah but i'd prefer yours its more practical
(I had 1 chem course, but 4 physics)
@Ampt There was a lab science requirement of three quarters of physics, chemistry, biology, or a combo.
user41796
@user120547 bah. I wouldn't worry about that. You sound discouraged more than anything else.
Plus a math-science elective.
20:36
anyways im off to studying for discrete math now :) thank you guys so much again! feels good
Feel free to pop in any time.
user41796
@user120547 yw
user55340
@user120547 ask a good question to get 20 more rep, and stop in any time.
user55340
(or do 10 edits...)
user55340
20:36
(or answer a question)
0
Q: Viable evolutionary design / incremental design / continuous design methodolgies

LarsNielsenIs Design Dead? talks about Extreme Programming (XP) finally making evolutionary design / incremental design / continuous design viable as opposed to the mess of a code and fix project. Two quotes from the article: XP has rejuvenated the notion of evolutionary design with practices that allo...

user41796
@MichaelT Or log in with the other SE account which already has rep
user55340
@GlenH7 thats where the association bonus does help.
Started out as a good question, ended up Big List. I am disappoint. Can we put some close votes on this thing? --^^
user41796
@MichaelT 20 rep on any site is all that's required for chat.
user41796
20:38
@RobertHarvey Bam!
so using var gives you a call-by-reference
otherwise call-by-value?
user55340
In pascal, yep.
user55340
You could go into explaining "everything so far, we've passed the value of the thing to the function"
Ah, good old Pascal. Excellent for learning, but not much else.
user55340
And write a void function that swaps two values.
user55340
20:39
@RobertHarvey My intro class in CS was in pascal. Made it slightly awkward when the next class was in C.
user55340
(and then the next one was in C++ as "we're going to try this OO thingy")
I wrote a program once for the Apple II (in Apple Pascal) that had 30 procedures in it. It took 10 minutes to compile. Same program took about 10 seconds to compile in Turbo Pascal.
sure i can do that. but in the end of the day i will be required to answre the question: "that's neat, but why do i need it?"
user55340
@Dr.Elch Because then you can pass larger structures around... and introduce the struct in the next class?
user41796
FYI - I just did a stealth edit on user120547's question so anyone can remove up votes if they would like.
20:41
that's what i would do with technical people
but I have people that need something closer to a real world problem, they can relate to
user55340
I'd bias to staticlly sized arrays to start with then...
fair enough. I begin to think the same... :-)
user55340
and then show what they were really doing with an array and go to variable sized arrays (malloc).
user41796
@MichaelT It's a simpler approach and sidesteps knowledge they may not have regarding functions
user55340
pass by value vs reference is a confusing topic for quite awhile.
user55340
20:44
Oh, for fun...
user55340
10
Q: What is "pass-by-name" and how does it work exactly?

devnullI've check wikipedia, and googled but I still can't wrap my mind around how pass-by-name works in ALGOL 60. Thanks!

user55340
@Dr.Elch any other thoughts / questions about the ciriculum?
going down the array path would require me to limit arrays to integer arrays.
strings are another can of worms :-D
user41796
@Dr.Elch I don't think you want to introduce them to arrays of strings in C at this point, no
user41796
20:48
Although a single string is a valid exercise to play with
user55340
How abut a: int sum(int *arr)
so arrays, then pointers, then strings?
user41796
@Dr.Elch not a bad sequence, no. Gives you a chance to highlight how the variable name for a char array in C can also be used as a pointer.
user55340
Start out with "here's a sample program that reads 10 numbers - lets modify it to print out the sum"
user41796
And pointer arithmetic for char arrays is still somewhat common despite being dangerous once you start supporting unicode
user55340
20:50
and start with input1 .. input10 and how cumbersome that is... and adding it isn't easy either.
no pointer arithmetic for those guys for a long time Glen :-)
user55340
So then you make int[10] to store the values instead.
user55340
(but keep the int[0] + int[1] + int[2]) part
ok so far a good example
user55340
Then, you move that part into a sum10(int *arr) that works with 10 values only.
user55340
20:51
And then make it into sum(int *arr, int count) to handle arbitrary sized params.
user55340
And then go back to the original program and make it read an arbitrary number of values.
user55340
(pascal flashback... integer[10] was a different type than integer[11] -- you couldn't pass an integer[10] into a procedure that required an integer[11])
user55340
So anyways, now that you've got the arbitrary sized array, you show whats really happening with that int *arr- that its a pointer.
hmm but that example would already incorporate pointer arithmetics
user55340
@Dr.Elch Not really.
user55340
20:55
Your'e not doing *ptr++.
user55340
That's where the confusing part of pointer arith happens. You can keep it safely behind the []
user55340
int sum = 0;
for(int i = 0; i < 10; i++) {
    sum += arr[i];
}
return sum;
true i can still write it like that
user55340
And then you change to the arbitrary sized version, replace 10 with count and move back to the part where the array is allocated.
So you sneak pointers on them without them even realizing it? I like it. Smack! I got 'cher pointer right here!
21:02
but how do I explain the notation? :-)
[] vs. *
user55340
You could do it that way too.
user55340
int sum10(int[] arr)
0
Q: Windows 8 app about algorith?

user129010I'm studying programming in college and I've been told that I could find most the of algorithms on a win8 app, but none of my friends knows the name. Where can I find it?

@RobertHarvey halp
user55340
In C, I actually prefer writing int main(char *argv[], int argc)
@Ampt Scud launched.
user41796
21:04
@Ampt on it's way. Perhaps @WorldEngineer will completely dispatch it
user55340
(ok, so I had that bit off in the sum10 prototype)
user55340
it would be int sum10(int arr[])
user55340
Same notation.
maybe I can use the [] notation and later on refactor it to use the * notation to show them it's the same thing
user55340
Yep. The thing to start with is showing the use case first.
21:05
1866
A: Strangest language feature

Edan MaorIn C, arrays can be indexed like so: a[10] which is very common. However, the lesser known form (which really does work!) is: 10[a] which means the same as the above.

user55340
And then the solution to the problem... just look at all the programs on SO that have int var1, var2, var3, var4, var5 rather than int[5] var
that's because a[10] means *(a+10) ... and 10[a] means *(10+a) :) — Michel Kogan Jan 3 '10 at 14:50
user55340
@RobertHarvey Unfortunately, a[b] == b[a] doesn't work in C++ because [] can be redefined.
user41796
@RobertHarvey <shudders> Sooooo dirty.
But quite illustrative of pointer arithmetic.
user41796
21:08
I'm sticking with: Soooooooooooo dirty.
user55340
Its more a side effect of how [] works.
user55340
Its not that its dirty... any more than '1 + 2 == 2 + 1' is dirty.
holy crap I wasn't really aware of that ^^
user55340
@Dr.Elch Pointers though, they are dirty.
user41796
and 10[a] is really dirty because it breaks the semantic model that's been promised
user55340
21:11
@GlenH7 it breaks how you think of the operator, but not how the operator works.
it works because it is still a normal binary operator, but with a strange notation?
It works because addition is commutative.
user20683
@RobertHarvey Pointer addition is commutative :)
user20683
other types may not be
user20683
/pedant
user41796
21:14
@WorldEngineer So out of character for this room... :-P
Subtraction . . . addition's tricky pal. — Michael Jul 10 '09 at 18:34
user55340
-4
Q: C# function to find the delta of two numbers

Bryan CorazzaI just wanted to know if there's anything built into the .net framework where I can easily return the delta between two numbers? I wrote code that does this but it sounds like something that should be in the framework already.

user55340
o_O
user55340
@Dr.Elch just remember, when they ask why 0 is false, the answer is "I don't know"
21:18
10bro.jpg
user55340
50
Q: Why is 0 false?

MorwennThis question may sound dumb, but why does 0 evaluates to false and any other [integer] value to true is most of programming languages? String comparison Since the question seems a little bit too simple, I will explain myself a little bit more: first of all, it may seem evident to any programme...

user55340
54
A: Why is 0 false?

Robert HarveyBecause the math works. FALSE OR TRUE is TRUE, because 0 | 1 is 1. ... insert many other examples here. Traditionally, C programs have conditions like if (someFunctionReturningANumber()) rather than if (someFunctionReturningANumber() != 0) because the concept of zero being equivalent to...

Yeah, my math background isn't all that rigorous. But I do know about commutation. :)
alright guys, I think I have some good new insights what I will do with those people next time. Thank you a lot for your input!
user55340
21:22
user55340
Oh... wait... thats the locommutation.
user55340
@Dr.Elch Stop by anytime.
I will. Cheers and have a good evening! :-)
user41796
@MichaelT - so did you determine that room owners do not have the ability to give chat privs to under-rep users?
user55340
@GlenH7 There are too many variables in that bit that I'm not sure if it was the rep, owner, or some other issue.
user41796
21:28
Fair 'nuff. Sooner or later we'll find another user account to try and validate against
user55340
Still, today was a good day for chat.
@GlenH7 It's too bad you guys don't have a sock puppet for testing
user55340
@GlenH7 how many downvotes would it take to reset @Ampt to 1 rep?
user41796
serial down voting algorithm kicks in much more quickly than up vote algo.
@MichaelT More than I have in all my questions and answers
user41796
21:31
@Ampt good point - go write some more Q & A!
@WorldEngineer are any of those good for creating ascii art lines?
user20683
@Ampt Is ASCII line art essential?
@WorldEngineer uh.... yes?
at least for this stupid lab it is
user41796
@Ampt asciiflow.com/#Draw good enough?
user55340
21:43
asciiflow is my favorite.
user41796
I forget who first mentioned it in here
user55340
Jul 19 '13 at 20:14, by Ampt
http://www.asciiflow.com/#Draw
user41796
@MichaelT I can taste the bitter, metallic irony...
@GlenH7 close. I need to be able to draw actual slopes
like, given two points, draw an ascii asterisk line between them
got the vertical case done
user55340
21:46
gnuplot?
user41796
maybe draw.io then? But it's not ascii line art
gotta be ascii. Really i just need the damn algorithm haha
but I'm slowly making one
user41796
google asciiflow and you'll find the git / github code
user41796
github.com/lewish/asciiflow You're a coder - fix it. :-)
user55340
21:48
2
Q: Python ASCII plots in terminal

Mike VellaWith Octave I am able to plot arrays to the terminal, for example, plotting an array with values for the function x^2 gives this output in my terminal: 10000 ++---------+-----------+----------+-----------+---------++ ++ + + + + ++ ...

user20683
You'd just need a raster line drawing
user55340
26
Q: Command-line Unix ASCII-based charting / plotting tool

bajafresh4lifeIs there a good command-line UNIX charting / graphing / plotting tool out there? I'm looking for something that will plot xy points on an ASCII graph. Just to clarify, I'm looking for something that will output a graph in ASCII (like ascii-art style), so I can use it over an interactive shell s...

user20683
and then just use the value of * in ASCII rather than others
oh damn, ascii plotter looks like it fits the bill

« first day (1265 days earlier)      last day (4023 days later) »