Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FlapYoJacks
Feb 12, 2009
Oh look at me, i'm python, I have to be formatted properly to work? Is your tabs wrong? Can't write lovely looking code that looks like this?
code:
int i;int j;int main (void){while ((scanf("%i", &j)))for (i = j; i >= 0; i-- {usleep(1000000);printf("%i\n", i);}return 0;}
WELL gently caress YOU!

Oh whats that? You don't have to declare anything? Why sure! Come on in spelling mistakes.


Python is a pretty terrible language for a multitude of reasons. Those two being the biggest.

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

HORATIO HORNBLOWER posted:

lol scanf get the gently caress out of here forever

The programs I write generally don't have user input from the command line. :smith:

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

"python won't let me do bad thing, therefore it is bad"

Yeah man, having to declare your vars is so bad.
*edit* I don't write code like my example in one single lines. That's dumb and people are dumb if they do that. However tabs and styling are usually slightly different among people. :colbert:

FlapYoJacks fucked around with this message at 00:15 on Jan 13, 2013

FlapYoJacks
Feb 12, 2009

Jerry SanDisky posted:

you can declare variables in python

Python code:
x = 5
hey look at that, now there is a variable called x, its an int, and its value is 5

But you don't have to, so spelling mistakes can be made easily. Good try.

FlapYoJacks
Feb 12, 2009

FamDav posted:

So you're saying your code would actually compile?

:confused: That code I posted other than #include <stdio.h> and #include <unistd.h> would compile just fine.

FlapYoJacks
Feb 12, 2009

FamDav posted:

maybe you should indent it and find out

well look at me dropping a parenthesis.
:suicide:


Jerry SanDisky posted:

oh my god are you for real


How am I wrong?

FlapYoJacks
Feb 12, 2009

Jerry SanDisky posted:

every modern editor will do the same spell checking and reference checking for python that it does for languages like c



if you're losing productivity in a language because you're a literal retard who can't spell, then thats not the languages fault

Good to know. I use VIM or eclipse, and haven't used python in a long time. I still don't like having to have the formatting their way though. :smith:

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

they shouldn't be, and you shouldn't justify bad languages based on their ability to ignore your social problems
They shouldn't be, but they can be. Wherever you put your { or ( shouldn't really matter.

quote:

don't reassign variables and use shorter methods, forced declarations are a crutch for bad programmers to write bad programs

forced declarations are just fine and they aren't a bad thing.

FlapYoJacks
Feb 12, 2009

MeruFM posted:

unironically saying forced styling is bad
smdh

at least argue against python for not having real encapsulation or something real like real

sounds like someone failed python 101

Someone messes with memory registers all day.

FlapYoJacks
Feb 12, 2009

Tiny Bug Child posted:

yes they are. there is no reason you should ever have to declare a variable



I'm just used to it. It takes all of 3 seconds to type int i; and if it means I get to actually use a programming language that can shift bits and mess with GPIO pins/memory registers, then that's a-ok with me. :unsmith:

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

oh hey surprise it's a low-level programmer, who thinks that just because they only program lovely computers that are a pain in the rear end to program they're opinions matter

Oh look it's somebody who probably uses the heap.

FlapYoJacks
Feb 12, 2009

vapid cutlery posted:

jesus christ when did talking about C++ become acceptable in this thread

Agreed, we should talk about assembly. :colbert:

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

this goes for any programming

if it works now and might be maintainable in the future, it's fine

Until you start programming for embedded (8k processors 64k ram). Then you don't have to worry about silly poo poo like user interactions :smug: Then my code doesn't have to be very portable or maintainable for the most part (I still try to keep it clean and documented though.) Static memory allocation no mallocs everydayyyyyy.

FlapYoJacks
Feb 12, 2009
Serious Q time though: Why would I use Perl instead of C/C++? I want to learn it but so far (emphasis on so far) I haven't ran into to much that couldn't be coded almost as easily in C/C++. If there is a huge ultra mega super duper thing that makes Perl better in a certain situation than C I would like to know so I could look forward to something in my studies. :smith:

FlapYoJacks
Feb 12, 2009

Otto Skorzeny posted:

my first week at work i got tasked with generating hex configuration files for a product from a spreadsheet. i read the spreadsheet with a cpan module and wrote the hex file with pack. the whole thing took a couple days, as opposed to the weeks that had been estimated. generally string handling is where perl shines, and the availability of eighteen billion cpan modules means that half your work is done for you most of the time. it really is a swiss army chain saw for one-off programs

it's useful for bigger stuff too, but the perl you'd write for a program that is going to be maintained and reused is much different than the perl you would write if you wanted to reverse all the lines in every file whose name matches /f{1,3]}\d\.bar/ or whatever

Ah this is good to know! Now I am looking forward to learning how to string handle in a higher-functioning language. <string.h> more like <hangme.h>. Thanks!

FlapYoJacks
Feb 12, 2009

Otto Skorzeny posted:

you are a student, so this misconception is acceptable. i write firmware for a living and you very much need to worry about silly poo poo like user interactions (even in a device like a transducer where a human doesn't normally interact with it, you still need code for configuration and calibration and poo poo). in fact although the code that deals with user interactions is simple and boring I spend most of my time writing it, as marketing people will bikeshed endlessly about how a menu that is used once every thousand hours of device operation should be structured and oh by the way can you make the monochrome lcd turn red when an error condition is encountered?????? shouldnt be hard, it's Just Software(tm)

I was talking about setting up registers and drivers, of course menus need to have user interaction concessions and checks. I just really like messing with things on the register level.

FlapYoJacks
Feb 12, 2009

Otto Skorzeny posted:

oh also gently caress debouncing in software, throw a schmitt trigger on the button you shitheels

But that would cost a extra .01 cents! :smith:

FlapYoJacks
Feb 12, 2009

Carthag posted:

whats a good book on like idiomatic C or whatever. i feel like when i write C sometimes i just mash keywords in a row and delete poo poo until it compiles

C primer Plus

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

C doesn't have language-level support for Os, nobody wants to write an ORM for it

It may not, but I still program it with Os in mind.

FlapYoJacks
Feb 12, 2009
You know what's awesome? When I am handed a project that includes a loving heavily modified Linux Kernel with no documentation and 3000+ lines of code changed among 100+ files.

Oh wait, that's not awesome, that's super loving lovely.

FlapYoJacks
Feb 12, 2009

Otto Skorzeny posted:

bet it was forked from 2.2.x or some poo poo too

2.6.32

Even worse is it's TI code that I have to dig through. LOL VPFE VPBE IPIPE :suicide:

FlapYoJacks
Feb 12, 2009
Fun fact:

TI was so incompetent with their Davinci platform that they don't support gstreamer anymore. Even better yet is if you want help they direct you to another company for help with it because they only had one guy from India working on their Kernel code.

FlapYoJacks
Feb 12, 2009

Bream posted:

WishYouWouldAbstractAwayYourPostsFactory.MakeOne().DoIt()

void fuck_off(seriously char* fuck_you char*)
{

return 0;

}

FlapYoJacks
Feb 12, 2009

Jonny 290 posted:

so uh

i had 6 weeks to do this at first
one of our liasons hosed up and told them 4 by (honest) mistake
then they cut it to 2, it's due for final tests at 5pm tomorrow. i procoded and busted my rear end and i could have finished it today but if i signal to testers that i finished early i'll never escape deadline shaving. so i left a couple garbage lines in there so i technically 'do something' tomorrow.


also i'm introducing them to git for the first time with this and they're all :aaa:

I never understood why you would use git over svn other than projects over the internet that are community driven. In a corp environment svn seems to work fine for me. :shrug:

FlapYoJacks
Feb 12, 2009

gucci void main posted:

shaggar do you even have a repo in real life? do you even commit?

I don't always commit, but when I do I break the build. :smug:

FlapYoJacks
Feb 12, 2009

horse mans posted:

cool reddit poo poo thanks you can leave now

Hey man, what crawled up your butt and died. You keep acting that way and someone might actually piss in your cheerios. :mad:

FlapYoJacks
Feb 12, 2009
Today I stared at a firmware bin not doing it's job all day. At first I was all like "Marvel!" :argh: because of this poo poo:

- All status checks return pass when the module is insmoded.
- All pins setup correctly on the board
- All data lines going to the 8787 are working properly
- Correct Vendor ID and Device ID's are showing
- The clock going to the SD1_CLK is correct
- The firmware is being loaded into memory
- The register offsets that it's checking are correct.


Oh hey my boss laid out the board wrong and added two pull-downs (one on hw1 and another on hw2) and the firmware was trying to activate on G-SPI instead of SDIO where it was actually wired into, thus never changing to register to the "I'm ready" state.
THANKS BOSS MAN!

FlapYoJacks
Feb 12, 2009

abraham linksys posted:

i'm working on a project that has both a requirements.txt and a package.json because it's a tornado-based python app that uses grunt to compile static assets :shepface:

I will give you a gun with a single bullet in it and a butter knife. After a week you are going to be real upset you used the gun to shoot your computer.

Luckily you still have your butter knife to kill yourself.

FlapYoJacks
Feb 12, 2009

Werthog 95 posted:

The Holy Bible is the source of all ultimate truths

It also has good news!

FlapYoJacks
Feb 12, 2009

ymgve posted:

2013's world wide web top 1000 is facebook, google and 998 link farm sites

um excuse me I think you forgot https://www.apple.com/store whenever it goes down for even 1/100th of a microsecond.

FlapYoJacks
Feb 12, 2009

JewKiller 3000 posted:

any actual c/c++ expert would know not to call himself a c/c++ expert

If school taught me anything, it's that you learn you don't know poo poo.

FlapYoJacks
Feb 12, 2009

prefect posted:

i took an intro to java training class at sun (many moons ago), and it was loving awesome. there was all kinds of remedial stuff i didn't know, like actually understanding binary math, and stack/heap stuff :allears:

i took a second training class and tried to get the same teacher, but apparently they have a policy against letting you do that; they're afraid of stalkers :(

If you don't know binary math and stack/heap stuff you don't need to be programming.

FlapYoJacks
Feb 12, 2009

MononcQc posted:

If you don't know <thing I know> you're a terrible person.

It's stuff you need to know to program. Holy poo poo if you can't count by power of twos you have no business programming a computer that RUNS OFF OF POWER OF TWOS.

FlapYoJacks
Feb 12, 2009

Cocoa Crispies posted:

why

why does a literal idiot making a porn site with php need to know that

why does somebody making python scripts that call wget need to know that

why does anybody who has a loving compiler on their computer need to know that

Because it's incredibly simple and you can learn it in less than one minute?
Because computers run off of it.
Because having a basic understanding of what a computer actually does isn't a bad thing?
Because if you want to be a programmer instead of a script monkey you need to have at least a basic understanding of how computers operate and work?

I'm not saying you need to know bitwise operations, but good god man, counting by 2's isn't hard at all!

FlapYoJacks
Feb 12, 2009

Tiny Bug Child posted:

PHP: make a lot of money, get flown to porn conventions, take it easy

python: get fired because a crazy lady overheard you say "dongle"

FlapYoJacks
Feb 12, 2009

PleasingFungus posted:

to program, do you need to understand the language your compiler/p-lang interpreter was written in
do you need to understand assembly
do you need to understand machine code
do you need to understand CPU design
do you need to understand semiconductor design
do you need to understand quantum tunneling

the entire point of programming languages is to provide a level of abstraction where, for the most part, you don't need to understand or even know what lies underneath.

getting trolled by "ratbert90" itt


Abloobloo bloo, I don't want to understand simple poo poo like memory. Throw everything on the heap and call it good!

FlapYoJacks
Feb 12, 2009

Nomnom Cookie posted:

In a good language, like java

Stopped reading there.

FlapYoJacks
Feb 12, 2009
C# isn't bad at all. I rather like it actually.

FlapYoJacks
Feb 12, 2009
Today I spent all day trying to wiggle a pin that could not be wiggled. THANKS TI for having lovely documentation.

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009
TI sucks

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply