THESE FORUMS NOW CLOSED (read only)

  • 20 Apr 2024, 01:36
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: The Programming Thread.  (Read 6784 times)

Grawsith

  • Guest
The Programming Thread.
« on: 25 Oct 2006, 14:03 »

It has come to my attention that several people in this forum enjoy (or at least, understand) the fine art of the codemonkey. So I made this li'l thread to discuss this topic. To get the ball rolling:

I'm making a "QC Browser" (a web browser coded into the Questionable Content sites) as my first project in C#. Any tips / hints / idea's would be GREATLY appreciated, since I currently suck at C# (having used VB for ages).

Go the codemonkey!
Logged

SeanBateman

  • Guest
Re: The Programming Thread.
« Reply #1 on: 25 Oct 2006, 14:05 »

computer forum.
Logged

Grawsith

  • Guest
Re: The Programming Thread.
« Reply #2 on: 25 Oct 2006, 14:07 »

Fair enough. Can't argue with a moderator. Know any good ones?
Logged

Eris

  • Duck attack survivor
  • *****
  • Offline Offline
  • Posts: 1,919
  • bzzzz
Re: The Programming Thread.
« Reply #3 on: 25 Oct 2006, 14:09 »

He means the computer forum that is on the qc forums. It's on the index page.
Logged
Quote from: Drunk Pete
MACHINS CON ESFU EPETE

SeanBateman

  • Guest
Re: The Programming Thread.
« Reply #4 on: 25 Oct 2006, 14:10 »

Um i don't know the url, but if you go up, and click other Fun things, there is a link that says "computers and Video games" which I think probably relates to this pretty well, since this is about computers?
Logged

SeanBateman

  • Guest
Re: The Programming Thread.
« Reply #5 on: 25 Oct 2006, 14:10 »

Also dude I am not a real moderator I am a pretend moderator, sorry.
Logged

Grawsith

  • Guest
Re: The Programming Thread.
« Reply #6 on: 25 Oct 2006, 14:13 »

Damn. I get it. It's just that i instantly thought of this after posting on "I like fish". apologies for my laziness. Are thread's movable, or do i just start over?
Logged

Scytale

  • Guest
Re: The Programming Thread.
« Reply #7 on: 25 Oct 2006, 15:06 »

I'm not strictly a code monkey (I'm a Materials Engineer) but I spent most of my day coding it seems.  Which suits me fine since I enjoy it, unless its repetitive crap.

My department has nicknamed me  the "SQL bitch", seems thats what I spent most of my day doing. I always get phone calls with crap like
"Hey can you get some info on... from ... database for me"

So frustrating. I'm probably the only engineer in our group that nows how to query  the data base, since it stores stuff like quality and production figures it's kind of important to get the info out. Everyone at work used to use Microsoft Access, but the IT department banned it (something to do with security issues). So everyone is lost without drag and drop querries. We do have an OLAP/BI suite called SAS but it's pretty clunky and not many people like to use it.

So I've spent the last month on all this web based report generation stuff. To automate a bunch of the commonly asked for stuff. Now I'm in the process of fine tuning it based on the feedback I'm getting I spent most of today sortin through emails saying stuff like, "change the x-axis scale on this graph" or "can you display this as a ratio not a percentage" and crap like that.


If you haven't done any programming for a while you might want to try something easier then a web browser. I don't know if C# is the best langauge for stand alone apps either, if I was coding something like a web browser I'd use C++ that would make it run a big quicker
Logged

Grawsith

  • Guest
Re: The Programming Thread.
« Reply #8 on: 25 Oct 2006, 15:11 »

Well, I'm using Visual C# Express. You can pretty much make a barebones browser in 3 minutes (click, insert browser, click, insert buttons, click, code).

But I wanna use C#, 'cos it just feels natural to me.
Logged

Scytale

  • Guest
Re: The Programming Thread.
« Reply #9 on: 25 Oct 2006, 16:49 »

Ahh ok I thought you were designing it from the ground up.
Logged

Catfish_Man

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 369
    • Assorted Stuff
Re: The Programming Thread.
« Reply #10 on: 26 Oct 2006, 00:32 »

Heh. I work on WebKit some... designing a web browser from the ground up is not a project you would want to do. Rendering the broken HTML out on the web is an absolutely nightmarish task; Huge methods full of if(/*some condition that should never happen in a sane world, like 500 nested < b > tags*/) { /*fucked up hack */ } over and over. Then you've got security to worry about, and the fact that the modern web relies on about 20 different ambiguous 50+ page specs, plus attempting to mimic Internet Explorer's bugs for quirks mode, and then you have to try to make it go fast.
That said, once someone else has done the hard part of getting it working, it's actually a rather fun project.
Logged

Scytale

  • Guest
Re: The Programming Thread.
« Reply #11 on: 26 Oct 2006, 12:49 »

Can't you just use one of the opensource html rendering engines?

Konqueror's engine is supposed to be pretty good.

edit: Never mind just looked up what WebKit was, I feel like a tool now...
« Last Edit: 26 Oct 2006, 12:57 by Scytale »
Logged

elcapitan

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 364
Re: The Programming Thread.
« Reply #12 on: 26 Oct 2006, 15:01 »

If you want an interesting challenge, try implementing some graph theory algorithms. They can be done relatively easily in C# and Java (compared to, say, C, where you have to do lots of ugly pointer-chasing), and they can be quite easy to visualise. If you want to be a gun coder, you need to build up knowledge of algorithms like this so that you can apply them to solving common problems efficiently.

Another good thing to do is learn about dynamic programming.
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #13 on: 27 Oct 2006, 01:15 »

Start small, always start small...

Visual C# Express is an IDE...  Nothing to do with the language.  You can use C# in that, you can use Sharp Develop, hell, use UltraEdit.  I think you are mixing and matching the GUI stuff with the code itself.

VB, imo, is an amalgamation of some busted-ass GUI stuff, a horrible language with bad grammar, and event-driven crap tying it together.

C# can be just code.
Logged

mberan42

  • Bling blang blong blung
  • *****
  • Offline Offline
  • Posts: 1,174
  • Fry... You're my friend...
Re: The Programming Thread.
« Reply #14 on: 27 Oct 2006, 01:58 »

Code: [Select]
128.0.0.0
sweet
128.0.0.0
Logged
My parents were always on me to groom myself and wear underpants. What am I, the pope?!

elcapitan

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 364
Re: The Programming Thread.
« Reply #15 on: 27 Oct 2006, 14:21 »

Actually, Mike makes a very good point.

Go back to basics. Make sure you understand the difference between an IDE and a language. Make sure you understand how the language handles objects, types, functions, methods, etc.

Oh. If you want to learn an interesting language, learn ADA.
Logged

Scytale

  • Guest
Re: The Programming Thread.
« Reply #16 on: 27 Oct 2006, 19:55 »

I had to write a essay type thing on type safety and exception handling in ADA for uni, mainly about is roll in the Ariane 5 incident. Kiind of turned me off the language

 Our lecturer was a Bertrand Meyer Fan boy and pretty much gave out full marks if you mentioned the problem could have been prevented by using DBC methodology like invariants and pre and post conditions.

The big thing I learnt after entering the workforce is the big difference between "accademic" programming langauges like Eiffel and ADA and "real world" languages. At least for engineering type work, I used to do a bit of simulation process modelling stuff in my first position. C and C++ are the absolute kings in this  area, with Java gaining a fair bit of traction as well. Oh and  I've never met anyone who uses formal proofs to varify the correctness of their code. At uni they kept cramming things like loop invariants down our throats, when realy they would have been much better teachnig us how to use a debugger properly...

I'd say C is probably the best langauge you can ever learn, I taught it to myself using the O'Reilly C book.  Once you wrap you're head around C you become a much better programmer at least in my experience. It is also an extremely powerfull language, if you can get the hang of pointers and memory allocation it becomes very easy to start implementing you're own optimised data structures and things like that and that leads to fast code. If you need to program anything remotely low level or anything that interfaces with something at a low level (like threading or sockets), you'll need some C knowledge.

If you want to learn an accademic language go with  something like LISP or Haskell. I really wish I had learnt a functional programming language...
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #17 on: 27 Oct 2006, 21:52 »

C drives me batshit crazy because of the lack of ease of finding a library and an API for it.  That's where Java/J2EE and .NET come in handy; they whole class library that comes along for the ride.
Logged

Catfish_Man

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 369
    • Assorted Stuff
Re: The Programming Thread.
« Reply #18 on: 28 Oct 2006, 03:57 »

That's actually basically why I like Objective-C/Cocoa. It gives you the dynamic-OO + shiny API stuff for most tasks, but the language is a strict superset of C, so you can still use the huge assortment of odd special purpose bits of code that have accumulated for C (as well as dropping into pure C for performance reasons when needed).
Logged

Rubby

  • The German Chancellory building
  • ***
  • Offline Offline
  • Posts: 459
    • http://members.shaw.ca/baby.snakes
Re: The Programming Thread.
« Reply #19 on: 30 Oct 2006, 12:50 »

Oh and  I've never met anyone who uses formal proofs to varify the correctness of their code. At uni they kept cramming things like loop invariants down our throats, when realy they would have been much better teachnig us how to use a debugger properly...
This is good to hear. I'm so sick of getting C's (pun?) because I didn't state all my function invariants. Of course, in the real world I wont be getting graded on assignments but it's nice to know I wont be getting my ass kicked for leaving out the occasional invariant or condition documentation.

Thread starter. It seems like you need to step away from Visual Studio for a little while. Something I found good was to write a few small programs in notepad (or something like nano on a Unix system). That way you're focusing on writing good clean code because you know debugging is gonna be a hellbitch if it's not nice code.
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #20 on: 30 Oct 2006, 19:56 »

Write recursive algorithms for a while, and learn O notation.
Logged

Rubby

  • The German Chancellory building
  • ***
  • Offline Offline
  • Posts: 459
    • http://members.shaw.ca/baby.snakes
Re: The Programming Thread.
« Reply #21 on: 22 Nov 2006, 10:02 »

After writing code for hours on end and nearly smashing the monitor a few times, I was able to get a good chuckle at this error message I got.
Has anyone ever seen this before?
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #22 on: 22 Nov 2006, 10:38 »

Sure.  It means fix the problem on line 13 before you worry about line 22.

Also, today I rediscovered just how much I hate CVS.  (Hint: it is a lot.)
Logged

Catfish_Man

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 369
    • Assorted Stuff
Re: The Programming Thread.
« Reply #23 on: 22 Nov 2006, 11:17 »

Switching to SVN isn't possible?
Logged

Rubby

  • The German Chancellory building
  • ***
  • Offline Offline
  • Posts: 459
    • http://members.shaw.ca/baby.snakes
Re: The Programming Thread.
« Reply #24 on: 22 Nov 2006, 11:48 »

Sure.  It means fix the problem on line 13 before you worry about line 22.

Also, today I rediscovered just how much I hate CVS.  (Hint: it is a lot.)
No that's not it. That error on line 13 has been around for a while. I know exactly what's going on there, I'm just too lazy to overload >= for the time being.
that bail out only happened the one time.

Also SVN > CVS for sure.
« Last Edit: 22 Nov 2006, 11:50 by Rubby »
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #25 on: 22 Nov 2006, 20:23 »

I'm trying to force the switch, I'm trying really hard.  But it's a gov't organization, and I'm just a consultant.  As much pressure as I can put, I put.  But is it enough?  We shall find out!
Logged

Catfish_Man

  • Pneumatic ratchet pants
  • ***
  • Offline Offline
  • Posts: 369
    • Assorted Stuff
Re: The Programming Thread.
« Reply #26 on: 22 Nov 2006, 21:59 »

If you need examples, you can point out how even large established projects like Mozilla and GCC are getting the hell off of CVS (and fixing big perf problems along the way in GCC's case; hurrah for SVN 1.4).
Logged

nihilist

  • Guest
Re: The Programming Thread.
« Reply #27 on: 22 Nov 2006, 23:38 »

Oh, I have no end of things to point at.  Just that there aren't enough "resources" (slave labourers) employed to deal with the change.  And the people who have to be the admins...  Oh, well.  Skills?  What are those?
Logged
Pages: [1]   Go Up