Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it,
follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given
their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'
Posts
so you ARE that professor (ノಠ益ಠ)ノ彡┻━┻
i'll take a look at your mats. should be fun. is this for ee's or for general sci?
Joe's Stream.
Yup. General computer science. I assume you already know this stuff Joe, so you don't need to take a look at it. This is more for people that are interested in learning how to program and want some help.
The flow of the program:
Client -> Server -> Service Fetcher -> Service
Client connects via socket to server. Client picks service to run, server takes client's request and sends to Service Fetcher to go fetch that service. Service loads and takes client input then closes, leaving Client back at Server choosing which service to run.
But now I'm having trouble taking input from the client and using it in admin management. I had a Scanner object that would catch the input and do something with it, but when StreamGobbler comes to that line it passes me a null pointer object. I tried doing,
where connection is that socket passed from the Service Fetcher, but that gives me a StreamCorruptedException: invalid stream header: 00017400 . Which looking up, means that the inputstream isn't accepting a new header but gets one. Anyone know how I might fix this?
Google+ Profile Origin: 13Evigilant Steam: Evigilant
Why aren't you teaching your intro course in Scheme, seeing as you're a big fan of the functional programming. University mandating the language to you?
It would be Racket, technically. =)
No, python is my choice. The class is a stipped-down version of my traditional intro course I taught last Fall except geared towards high school students and compressed into a 3-4 week chunk instead of 13 (it is for a Summer academy program that offers selected high school students a chance to try out college-caliber courses in technology). With those parameters, Python makes the most sense because it has little cruft when dealing with programming fundamentals and the language transfers well to whatever the student does next (programs on their own, goes to college and takes an actual undergraduate intro cs class).
At the introductory level, both imperative and functional styles ought to be taught because they require distinct reasoning skills (invariants vs. abstraction) that a computer scientist needs to be able to exhibit. Currently, the majority of the field teaches almost exclusively the former but the tides are slowly changing both at the grassroots level (e.g., see CMU's principles of imperative and principles of functional programming courses) and at the policy level (e.g., see the Computer Science Curricula task force 2013 report).
Almost all functional languages let you mix paradigms though, it seems like purely function is the exception, not the rule.
The difficulty with python is that you're going to have students that already know some of it. That's always been the thing I found the hardest with intro courses, how do you keep from boring the people that know some of the material to tears without losing the ones for whom it is truly new material? Picking some esoteric language is a pretty easy way around it, if not a particularly satisfying one.
I'd just look at some programs you like using, and go from that. You really just need a version number, some contact / help urls, and maybe a publish date.
Not sure what you're getting at with the "purely functional is the exception" comment. Virtually any functional language offers mutation directly via reference types or monads or indirectly via closure encodings. So in that sense, there's paradigm mixing. But there's a difference between what a language allows and what is expected of its programmers, and with most functional languages, the expectation is to only resort to mutation when necessary.
What you described is currently a difficulty of any introductory CS course, regardless of the language taught, because CS education is not standardized at the HS-and-below level (which is another important movement all on its own). The critical thing that I've found doing this is that the "know-it-alls" at this level actually don't know much more their peers. The problem then becomes people management where you engage those students separately with level-appropriate content while ensuring that their attitude doesn't poison/scare off the rest of the class.
If you wanna get fancy open Eclipse and check out their About. Not only does it give you the about for the base program, all the major plugins have a button you can press to get their about.
I thought your point was that python mixed imperative approaches and functional approaches better than most languages, but re-reading it, I don't think that was exactly your point. I do agree that it's as good an introductory language as any. We used to use C here, but we switched over to Java a couple of year ago. I'm not sure if it's the language or the courses, but the intro sequence is decidedly worse off for it.
God, typos everywhere. Need more coffee.
On the programming exercises you set you have stretch goals beyond the core marked assesment, that way the ones who know stuff get to show off their mad skills.
Nah. Python mixes them to the same level that C# does with list comprehensions and map. So in that sense, I don't think there's really any interesting mixing that occurs. Really the difference is embracing immutability which neither of those languages does. Scala does a better job of it, but I ultimately don't like it because precisely because it offers two worlds without clear guidance on which to use and when.
With respect to Java and C, it's partially the language and partially what comes out in the course as a result. Java is crufty as hell, but you can work around that, and I did in my Fall intro course. But in general there's a tendency with Java and an objects-first curriculum to shield the students away from problem solving and design in favor of producing "glitzy" programs where the student just fills in a small part of some program skeleton. The problem is that the problem solving and design are (1) precisely the interesting part of programming and (2) the core of computer science, so they fail in both aspects. When you start tuning your content towards that goal, you find the languages become less relevant as you can address these fundamental concerns in any of them.
Basically, there a subset of people who are simply incapable of learning to program regardless of languages or techniques used.
It's funny, MIT's Intro to CS Serious course is still done in LISP i think.
It is nice that functional thinking has come to the forefront recently, personally, i think that it's due to JQuery of all things, but syntacitical sugar for anoymous functions in python, c#, scala and others exposed a lot of people to the style. it's a good thing, because shifting away from this obsessive compulsive disorder about OOP is way overdue.
Joe's Stream.
That's very, very interesting. My wife, who is a math person, cannot program to save her life. I wonder is that has something to do with it... She loves proofs.
she's probably been scarred for life by FORTRAN...
mang any language that lets you change the value of 4 that easily... (o_O)
Joe's Stream.
I believe that's ultimately true in the same sense that some people never never truly grok calculus, music, english, or any other field. But I also believe that as a field, computer science has done a poor job of preparing students to study computer science seriously in college and then, once they're here, articulating what they need to learn to achieve mastery. And a good deal of it is because we've drifted away from focusing on algorithmic thinking as the core concept that we teach.
In the next 10-20 years when we've fixed those problems, I think that we'll find that programming becomes as accessible as playing a musical instrument. Clearly not everyone will become world-class musicians, but we'll be able to teach someone the fundamentals in a compelling and rigorous way.
(Also note that the study he cites along with other similar ones that have been performed are testing the students notion of a pre-condition and post-condition with respect to mutation. I've always viewed these studies as evidenced that imperative programming is difficult and should be treated as such.)
MIT has moved from scheme to Python, actually. Northeastern still does everything in Racket. Here at Penn, we've moved from Java to Java+OCaml. Elsewhere people are considering transitions from Java to Python as well, but I think there's a lot of programs holding their breath for the final word from the Curricula task force before they start overhauling.
(((((Oh(((God(They)(Used Scheme)))(?)((That's(evil!)))))
(((? (used (oh god) (they)))(! (is (that evil)))
(let ((x '(they)) (y '(oh god))) (if (used-scheme x) (do (apply #'exclaim y) (is-evil x))))
Lisp :rotate:
Ahh sleep, it does a body good.
I'm not sure what to tell you man. You said it yourself, most of WPF is managed. A simple ILSpy run will get them exactly what they need. The issue is that finding a hardware accelerated back end to connect it to on Linux is a crapshoot. You could do it purely in software, but what the hell would the point be? It would be dog shit slow.
They could implement the entire WPF stack, aside from milcore, without needing any help from MS. They would then need to write their own implementation of milcore, which would be fun to say the least. They've already basically done it with Moonlight. So I guess if you want to buy Miguel's comment that the WPF stack is "too complex", when they've already implemented the bulk of the managed core API in Moonlight, that's fine...but I'll choose to continue to believe that the reason WPF doesn't exist in Mono is because of rendering back end issues.
Without getting a LOC count for the managed part and milcore it is hard to say how the work is split out, but based on exposed surface area we have many dozens of classes with thousands of functions on the managed side and 60 or so exposed functions on the milcore side.
The entire backbone of the WPF architecture (DependencyObject -> Visual -> UIElement -> FrameworkElement) is already there in Moonlight.
MilChannel_BeginCommand
MilChannel_CommitChannel
MilChannel_EndCommand
Those would handle all the actual rendering, most of the rest look like support for state manipulations
http://www.dotnet247.com/247reference/system/windows/media/composition/duce_z2bunsafenativemethods/__members.aspx
It's not a ton, but the stuff dealing with channels and commands have sort of sub-apis built in to them that do different things.
i guess the question is python 2.x or 3.x ... there's a forking going on
Java is awful for a foundation class. At least with C you forced people to work close to the metal. With Python, you get away from template coding, and hide some of the uglier features of C and C++... Honestly, it seems like a clear choice for intro classes.
Joe's Stream.
For most definitions of an intro class, the concepts that you are teaching don't require you to be anywhere near the metal. So what drives what programming language you use in the class comes from external factors as well as internal (e.g., expectations of other departments and courses downstream within the major).
I have a page I can access at localhost:3000/majors that lists all of the majors, with nice buttons. This is implemented through /app/views/majors/index.html.erb
I want to click on a link on that page and have it go to a new page for that major where the requirement scheme gets displayed. I put a static page in /app/views/requirement/index.html.erb, but when I try to go to it in the browser when I have the server running I get a wrong number of arguments error.
rake routes sez:
I'm assuming you have a controller "requirement" with action "index."
Lua has this as well, but you sort of have to roll your own object-oriented framework. Not that it's difficult; it only requires about 10 lines to define a nice base Object prototype. But that's one more barrier to entry. Python has that support built right into the language.
Either way, I'm glad I started with a language that has closures and first-class functions. Those concepts are way too important and useful to be left until later. My university, for instance, taught the entire curriculum in Java and C/C++; most of my graduating class never wrote a single closure. Even the idea behind Java's anonymous classes was barely covered.