[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


File: 1434465291433.jpg (84.62 KB, 620x387, 620:387, marijuana_2255302b.jpg)

f8e942 No.2605

I've been smoking/vaping weed on and off for about 8 months now and I've decided to start learning programming. Does marijuana impair one's ability to learn how to code? Should I quit weed altogether and just study programming or is casual use of weed still ok?

026d47 No.2606

File: 1434466295905.jpg (84.85 KB, 735x431, 735:431, carlsaganmarijuananasa.jpg)

decide for yourself.


026d47 No.2607

File: 1434466325667.png (276.44 KB, 500x374, 250:187, 1275942805224.png)


f8e942 No.2614

bump


d42f54 No.2685

>>2605

It's up to you. I stopped smoking before university and did well in my courses. I know people who continued, did fine, and have jobs now in industry.

Some of those people who did continue dropped out of university- was it because of the cannabis? Who knows- I think it was just because some people really just are lazy and don't want to commit to studies.

Really a personal decision. Life is a lot easier without cannabis for me. Save money, less things to worry about.


dcd7e0 No.2686

whenever I get stuck on a bit of code I find that weed helps me see a slightly different logical solution. I find it can help, but don't get too munched.


82b4f5 No.2707

Yes. Drugs are bad mmkay.


a502a9 No.3109

what's that they say? "write drunk edit sober"?

substances affect everyone differently OP can learn high, design high and code high if you can learn to be good at it.


5d0dd5 No.3111

>>2605

Given the fact that weed heavily impairs the hippocampus (short term memory center) means that it will be hard to focus and take forever to grasp certain things, especially with something like programming. It's not good for learning stuff.

It is more conducive to performing something you are already good at, so if you are a good coder, or a good mechanic or a good basket weaver then smoke while you work on a project and see how it goes.


3a610c No.3120

Our programmer that is a pothead writes some of the nastiest code I've seen. He cut+pastes everything rather than make functions. He also jumps whenever I come into his office and gets distracted easily. He's the reason I don't smoke.


4c6daf No.3124

File: 1440520687691.png (546.05 KB, 619x826, 619:826, BAKING WITH GANONDORF.png)

>>3120

Being shit doesn't mean that the drugs are the reason. Pothead infers that this guy smokes every day which is almost as idiotic as drinking every day. Truthfully instead of "smokingw33d3v3ryday" people should smoke every week with no smoking in between, or at most, every 3 to 4 days. That way you can actually focus instead of chilling.


69f244 No.3229

You're a fag. Weed is always OK, never stop using weed my friend, shut up. Please, have some weed, smoke some, and program your stuff while being stoned, just like me and 9999 thousand other script kiddies. Don't be such a normalfag you bastard. Shut the fuck up and learn how to program.


a8b888 No.3240

i can't say I code well on weed, especially if I'm being watched. But then again I can't say I code well when being watched not on weed either.

Seems to make it harder to switch and quickly regain focus … I prefer caffeine.


7b8b30 No.3252

>>3111

This has been my experience. The same goes for alcohol. Impairment keeps those racing thought demons at bay.


06f290 No.3265

File: 1442853774567.jpg (814.56 KB, 5152x3864, 4:3, DSCN1131.JPG.jpg)

in my opinion, yes, or at least to some extent, for me it makes me less intimidated and less frustrated when i get stuck, here's a rock paper scissors game i made in c when i was high, and edited when i was sober the next morning

#include <stdio.h>  //for printf and scanf
#include <stdlib.h> //for rand()
#include <time.h>

typedef enum {ROCK, PAPER, SCISSORS} RPS;
typedef enum {WIN, LOSE, TIE} RPS_match;

char toLower(int x);
char getChar();
RPS getUserChoice();
RPS_match compareRPSMatch(RPS first,RPS second);
RPS getBotChoice();
char* choiceToWord(RPS choice);

int main() {
int playing=1;
while(playing)
{
RPS usr,bot;

usr=getUserChoice();
//printf("Rock, Paper, Scissors!\n\n");
bot=getBotChoice();

RPS_match match=compareRPSMatch(usr,bot);
printf("\nbot picked %s, ",choiceToWord(bot));

if(match==TIE){
printf("it was a tie!");
}else if (match==WIN){
printf("you win!");
}else if (match==LOSE){
printf("you lose.");
}

printf("\n\nwould you like to play again? ");
playing=( toLower( getChar() ) == 'y' );
printf("\n");
}
return(0);
}
RPS_match compareRPSMatch(RPS first,RPS second){
if( first==second ) {return(TIE);} //it was a tie
if( (first==ROCK) && (second==SCISSORS) ){return(WIN);}
if( (first==PAPER) && (second==ROCK) ){return(WIN);}
if( (first==SCISSORS) && (second==PAPER) ){return(WIN);}//these are the only winning combinations
return(LOSE);
}
RPS getBotChoice(){
time_t t;
srand( (unsigned) time(&t) );

int index=(rand()%3);
if(index==0){return(ROCK);}
if(index==1){return(PAPER);}
if(index==2){return(SCISSORS);}
}

RPS getUserChoice(){
char x;
printf("Rock, Paper, or Scissors? ");
x=toLower( getChar() );

if ( (x!='r') && (x!='p') && (x!='s') ){
printf("Invalid choice.\n",x,x);
getUserChoice();
}else
{
if(x=='r'){return(ROCK);}
if(x=='p'){return(PAPER);}
if(x=='s'){return(SCISSORS);}
}
}
char* choiceToWord(RPS choice){
if(choice==ROCK) {return("rock");}
if(choice==PAPER) {return("paper");}
if(choice==SCISSORS){return("scissors");}
}

char toLower(int x){
if( (x>64) && (x<91) )
{
return( (char) (x+32) );
}else{
return( (char) x ); //otherwise return original
}
}
char getChar(){
char x;
char* real;
scanf("%s",&x);
real=&x;
return(*real);
}


b28038 No.3293

>>3265

Your code is riddled with issues.

* Don't use pritnf unless you're actually using formatters. Use puts (which inserts a newline) or fputs (which does not insert a newline) to just output a string.

* Use switch statements. If you use cascading ifs, use else if for readability and so changes in logic still keep optimal performance. Switch statements always perform the same or better, and extend more easily.


// Turn this
if(match==TIE){
printf("it was a tie!");
}else if (match==WIN){
printf("you win!");
}else if (match==LOSE){
printf("you lose.");
}
// Into this
switch (match){
case TIE:
printf("it was a tie!");
break;
case WIN:
printf("you win!");
break;
case LOSE:
printf("you lose.");
break;
default:
printf("ERROR");
break;
}

* Recognize the patterns to simplify your algorithm. If you index R-P-S, recognize that (wrapping with a modulus) Player 1 wins if they have 1 index greater than Player 2, loses if they have 2 indexes greater, and tie if they have 0. The basic logic is (3 + first - second) % 3. You should also have some sort of error conditions to help catch regressions in your code.

Your compareRPSMatch function is better written as such:


RPS_match compareRPSMatch(RPS first, RPS second) {
switch ((3 + first - second) % 3)
{
case 0:
return (TIE);
break;
case 1:
return (WIN);
break;
case 2:
return (LOSE);
break;
default:
return (ERROR);
break;
}
}

* You usually don't want to call srand more than once in your entire program, especially with your time function, otherwise two calls to the function in the same second will always yield the same result.

* call time(NULL) unless you are planning on using the time variable you pass to it directly.

* recognize that enums are just integers, indexed at 0. Instead of that switch in getBotChoice, you can just do a `return (rand() % 3)`.

* tolower is already a C function in ctype.h. getchar is a function in stdio.h

* Your getChar function overflows like a mad bitch even in the best-case scenario. %s writes into a char* buffer including the null byte, so it always writes the byte after the location of your char x argument at the very least, and writes as many bytes past that argument as non-whitespace characters are delivered to it in the worst case. It's a formatter designed to push into a char buffer, not a single char variable (and a bad formatter at that, unless you use the m modifier). It's also nonsensical to use your char* real argument to take the address of x, then dereference that same address to return it, instead of just returning x (perhaps you were having issues caused by your scanf clobbering your data). If you put enough data into it, you're guaranteed to get a segfault.


adbf94 No.3303

when i get high and try to program its usually just for reading through o'reilly books or tutorials.

i usually end up working on some shitty netart if i'm not doing that.


e9e5f9 No.3360

test


191555 No.3361

>>3360

You did it, my man! :'-)


6772f3 No.3379

>>2605

it actually makes it a little better, I was looking at the effect of marijuana on the brain and I found out that

it short-term (possibly long-term) lowers short-term memory and as the brain tries to deal with it increases the activity of another brain part responsible for space orientation. Turns out this part of a brain is heavily used in creating mind maps of things.

Basically the brain has a hard time remembering short term informations, so it imagines the informations in a mental maps.

The changes grow with your weed usage, so you basically both hurt your ability to code (by lowering short term memory) and also boost your ability to code (by increasing your ability to imagine your code in 'mind objects' inside your 'mind map', which can help to imagine relations between different parts of code better)

So it doesn't strickly hurt your ability to program, it just makes you use different part of your brain when you do that.

But if you want the best of both worl, combine your weed with high CBD weed (medical marijuana), because that actually negates the bad effects of high THC low CBD marijuana you normally smoke (indoor, skunk…)


6772f3 No.3380

>>3379

don't mind my english, that is not the effect of weed, that is my bad english


151b54 No.3401

You play vidya games? Does weed affect your ability to problem solve? Does it affect your concentration when you're not using it?

It's all down to you man, I'm not a very smart guy and I have a focusing disorder but I spend a lot of time learning in any way that I can, and I have been doing this for almost 7 or 8 years and I'm an above average programmer. But remember this- the brain is flexible, like plastic. If you change your behaviour (reading books, relaxing no games), it will change as well.


1ef582 No.3491

I bet you won't be as good and will take longer, but it's definitely not impossible.


51db05 No.3501

Do your work, and then by all means play.


86d62e No.3512

Stimulants are the best drug for programming


e991fd No.3553

>>2605

You're not going to quit anyways so what does it matter?

Also you're going to think of this: >>3379

When the opportunity presents itself rather than the rest of the thread.


d48ae3 No.3564

The Ballmer's peak also works for weed


ce367e No.3636

>>2605

I do.my best programming stoned to the bone


dd2812 No.3665

"when your coding while

chemically modified you will want to minimize any possible distraction

or break in concentration. The slightest wavering in your attention

will easily explode into a ten minute setback. If you can keep

yourself on-track then I find that productivity is greatly increased,

and with the properly trained mindset bug density on first pass is

usually drastically decreased"

t. le Craig Brozefsky quote


fbc87d No.3689

>>2605

if you smoke weed you become a weak, pathetic person.

www.adequacy.org/stories/2001.12.2.0160.24792.html

>Marijuana tells you that you are a better person for having smoked marijuana. Marijuana tells you that you are more creative when you smoke marijuana. Marijuana tells you that it helps you concentrate. What marijuana doesn't tell you is that you feel more creative because you have lost the ability to judge your work from the vantage point of someone who isn't stoned. It doesn't tell you that it replaced your critical thinking skills with the naive wonder of a six year old. It doesn't tell you that your present vague awareness of your surroundings is not the same thing as being relaxed and at peace. And most importantly, it doesn't tell you that when you become an habitual user its effects persist even when you are not longer stoned.


70ef94 No.3690

>>3689

I don't even smoke weed, but I know retarded, unfounded, uncited ignorance when I see it.

Especially that last sentence:

> And most importantly, it doesn't tell you that when you become an habitual user its effects persist even when you are not longer stoned.

[citation needed]


5b3274 No.3691

You should stop smoking weed because it is harmful to your body.


fbc87d No.3698

>>3689

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3479595/

www.rjbf.com/PNAS_Meier.pdf

https://archives.drugabuse.gov/NIDA_Notes/NNVol18N5/Cognitive.html

>NIDA-funded scientists have found that cognitive impairments resulting from smoking marijuana can last up to at least 28 days after an individual last smoked the drug. The more a person had smoked prior to abstinence, the more profound this impairment, with marijuana smokers with lower IQs faring worse than their higher IQ peers, even if the latter had routinely smoked more of the drug.

uncited ignorance?


fbc87d No.3699


4c6daf No.3701

>>3698

>NIDA-funded scientists

>NIDA-funded

>NIDA

So who the fuck is NIDA?

The same people that created these websites:

https://teens.drugabuse.gov

http://www.drugabuse.gov/

They totally don't have an agenda.

Damn it I fell for the bait didn't I?


bc26a9 No.3706

>>3701

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2825218/

>Conclusions

>In sum, this review demonstrates that adolescent marijuana users show working memory, attention, and learning abnormalities that persist at least 6 weeks following cessation of use, but that these deficits may resolve with longer term abstinence.

You're in denial.


bc26a9 No.3707

>>3701

I'm guessing you couldn't find anything wrong with this study, "Persistent cannabis users show neuropsychological

decline from childhood to midlife" ?

http://www.rjbf.com/PNAS_Meier.pdf


e58004 No.3768

If you can drop the habit one day without thinking about it and never smoke again, then you're okay. But if you can do that, why not do it right now and save the money and time?


0af80a No.3977

>>3512

this.

alpha-pvp changed my life




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]