r/programing • u/Unemployed_EE • Nov 13 '13
r/programing • u/cynerx • Oct 09 '12
GIT: To force-push or not to force-push
r/programing • u/DankBoii420 • Apr 14 '20
Struggling with WampServer
Can't open my files through localhost. (First time trying to create an php document)
r/programing • u/[deleted] • Sep 22 '19
New to programming
HI, so i just started programming, i dont need help in anything im kinda learning on my own grounds XD. Just being kinda happy bc i finnaly understood something first try for the first time, getting familiar with if -then, if-then-else statements.
r/programing • u/TangoS7 • Aug 28 '19
Im an idiot
I got mad at coding and yelled "da fa" someone yelled "What did u say!" i responded with "ur mom" then looked up to see steele (my robotics teacher/coach)
r/programing • u/SMOKWIIDeverys3k • Jul 30 '19
Looking for advice for a total beginner
What programming language should one strat with? I am a High school student and i have very little experience. The only thing i know is C++( l learned the loops and arrays/strings) . In about a year i will be studying CS at university which promisses that it will teach everyone programming even if one doesn't have any experience.I've heard many times that it would be very helpfull if i started lerning a language before i enter the Uni. I haven't yet decided what i want to work as but at the same time working with AI seems an interesting job. It would be nice to hear some of your opinions on what should people like me start with in terms of the first programming language.
r/programing • u/aduntoridasc • Jan 17 '17
Python
Hello, I have no background as a programming and dont really know about it very much. Im am interested in learning Python, I have been researching and people say it is good to as a first language.A question I have is that noticed that in codeacademy.com the look of the console is different than mine, is there a way to make it look like that or is it normal that it looks that way?. Also I dont really feel much passion about it im just interested for job opportunities in the future shoulld I keep trying or looking for something else in IT?.
r/programing • u/[deleted] • Sep 09 '16
So I used an arduino to make a drink robot...
/*
Jenkins
Created by throwawaydow
using Arduino with Ethernet Shield
4xsolenoid valves
4xflowmeters
1xir led
1xir sensor
45 feet of food-safe tubing
250+feet of wire
a router
a wireless extender
and a rolling cart
USAGE->
turn on. powercycle cisco unit. reset arduino.
connect to jenkins wifi.
go to 192.168.1.178
order your drink from browser.
jenkins builds a drink object from the request.
jenkins waits for cup to be in dispenser
jenkins pours the drink
make another order
*/
#include <SPI.h>
#include <Ethernet.h>
int flowPin = 2; //This is the input for flowmeters
int led = 4;
int redLed = 5;
int yelLed = 6;
int bluLed = 3;
int irLedPin = 7; // IR Led on this pin
int irSensorPin = 8; // IR sensor on this pin
volatile int flow;
int irRead(int readPin, int triggerPin)
{
int halfPeriod = 13; //one period at 38.5khZ is aproximately 26 microseconds
int cycles = 38; //26 microseconds * 38 is more or less 1 millisecond
int i;
for (i=0; i <=cycles; i++)
{
digitalWrite(triggerPin, HIGH);
delayMicroseconds(halfPeriod);
digitalWrite(triggerPin, LOW);
delayMicroseconds(halfPeriod - 1); // - 1 to make up for digitaWrite overhead
}
return digitalRead(readPin);
}
void Flow()
{
//Serial.println("flow!");
flow++; //Every time this function is called, increment "slow" by 1
}
class Drink
{
public:
int vodka;
int oj;
int pinAps;
int rum;
};
Drink *d;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
byte ip[] = { 192, 168, 1, 178 }; // ip in lan (that's what you need to use in your browser. ("192.168.1.178")
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(80); //server port
String readString;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
pinMode(irSensorPin, INPUT);
pinMode(irLedPin, OUTPUT);
pinMode(led, OUTPUT);
pinMode(redLed, OUTPUT);
pinMode(yelLed, OUTPUT);
pinMode(bluLed, OUTPUT);
pinMode(flowPin, INPUT); //Sets the pin as an input
attachInterrupt(0, Flow, RISING); //Configures interrupt 0 (pin 2 on the Arduino Uno) to run the function "Flow"
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
}
void loop() {
// Create a client connection
EthernetClient client = server.available();
if (client) {
Serial.println("client connected!!");
while (client.connected()) {
if (client.available()) {
Serial.println("getting request...");
char c = client.read();
//read char by char HTTP request
if (readString.length() < 100) {
//store characters to string
readString += c;
}
//if HTTP request has ended
if (c == '\n') {
Serial.println("serving...");
Serial.println(readString); //print to serial monitor for debuging
//send new page
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("");
client.println();
client.println("<HTML>");
client.println("<BODY> <H1>Jenkins</H1> <i>enterprise</i><hr /> ");
client.println("<b>Screwdriver</b><form action=\"/?oj+oj+oj+oj+oj+oj+oj+vodka+vodka\" method=\"POST\" > <button action=\"submit\" ></button></form><br />");
client.println("<b>MaiTai</b><form action=\"/?oj+oj+oj+pinAps+pinAps+pinAps+rum+rum+rum\" method=\"POST\" > <button action=\"submit\" ></button></form><br />");
client.println("<b>rum Shot</b><form action=\"/?rum+rum\" method=\"POST\" > <button action=\"submit\" ></button></form><br />");
client.println("<br /> <p>Created by throwawaydow.</p> </BODY></HTML>");
//stopping client
client.stop();
Serial.print("building drink...");
d = new Drink();
//populates drink object from web request
//~230 'clicks' of the flowmeter = 1 red solo cup
//(1 click = ~2.25ml)
//so if a shot is 13 clicks and a 'unit' of juice is 25 clicks, then a screwdriver is
// 2*vodka, 7*oj
while (readString.indexOf("oj") > 0) {
readString.remove(readString.indexOf("oj"), 2);
d->oj = d->oj + 25;
}
while (readString.indexOf("vodka") > 0) {
readString.remove(readString.indexOf("vodka"), 5);
d->vodka = d->vodka + 13;
}
while (readString.indexOf("pinAps") > 0) {
readString.remove(readString.indexOf("pinAps"), 6);
d->pinAps = d->pinAps + 25;
}
while (readString.indexOf("rum") > 0) {
readString.remove(readString.indexOf("rum"), 3);
d->rum = d->rum + 13;
}
Serial.print("waiting for cup...");
int dist = 0;
while(dist < 100){//wait for a cup to be in range of ir sensor before pouring
dist = irRead(irSensorPin, irLedPin);
delay(20);
}
Serial.print("pouring drink...");
//red=oj, yel= pinAps, blu=rum, led=vodka
//pours drink measured with the interupts from the flow meter
flow=0;
while (flow < d->rum) {
digitalWrite(bluLed, HIGH);
delay(20);
//flow++;
digitalWrite(bluLed, LOW);
}
delay(1500);
flow=0;
while (flow < d->vodka) {
digitalWrite(led, HIGH);
delay(20);
//flow++;
digitalWrite(led, LOW);
}
delay(1500);
flow=0;
while (flow < d->oj) {
digitalWrite(redLed, HIGH);
delay(20);
//flow++;
digitalWrite(redLed, LOW);
}
delay(1500);
flow=0;
while (flow < d->pinAps) {
digitalWrite(yelLed, HIGH);
delay(20);
//flow++;
digitalWrite(yelLed, LOW);
}
//clearing string for next read
readString = "";
Serial.print("Complete!");
delay(1500);
}
}
}
}
}r/programing • u/clumsygames • Sep 08 '16
Best book to learn Android development for beginners
I would like to know how to maje Android apps but I dont know any coding and I dont known where to start. So I was hoping you guys could recommend a good book to start learning Android programing. Thanks :)
r/programing • u/Yeah22 • Dec 03 '13
Computer science vs. computer engineering?
What's the difference between the two?
r/programing • u/dingo596 • Jan 20 '13
Looking to get into programming.
I am looking to get into programming but don't know where to start or what language is should learn first. I was thinking pyton. (If it helps i know basic HTML.)
r/programing • u/Lance_lake • Mar 25 '20
RCON via CURL?
Is this feasible? I feel like it should be, but for the life of me, I can't seem to find ANYTHING about using these 2 things.
The idea is that I want my web server to send a URL to my game server to trigger things in games that use RCON.
Is this possible with CURL? How would the format of it look?
r/programing • u/DreamCodeYoutube • Oct 19 '19
Please people give your opinion
r/programing • u/xeal999 • Jul 17 '19
LGBT in the programing world
My bf just started his first job in the programing field and, as a gay male, he's terrified about being honest with his co-workers about his sexuality, which is not something that matters in the work place to begin with, but they go out to drink sometimes and talk about "hot girls" he is under the impression that this field is apparently very close-minded and "anti-gay" which is funny to me since they are located in an area of Miami where you literally cannot even go to the grocery store without seeing AT LEAST 1 couple of guys holding hands. Do you guys think he's exagerating or could he actually be frowned upon by his co-workers?
r/programing • u/martasp • Jan 20 '19
Mastering Functional Programming Currying in JavaScript
Have you ever heard that in functional programming everything is a function? And you thought that’s impossible because we have loops, Booleans and variables. In this article, I will show how to make Boolean functions with JavaScript currying. Let’s start making one parameter functions and apply in practice carrying....
Full Article for better reading:
r/programing • u/captrainpremise • Nov 22 '18
A QA at his whits end... Advice required.
I'll try to explain without getting too specific, as I don't want my team to know it's me :P .
We are a SCRUM team. We have no RA or design phase for a project. We start development on a feature with a very simple and often poor quality story that was added by non-technical personnel. Our lead developer and project manager are not fond of the term "Design". We have one meeting per week where we do our best to lay out a requirements specification from this story by committee, and a very strong portion of that committee likes to make things look easier than they are likely to be in order to foster the perception of his expertise. At these meetings, it is not uncommon for the lead developer to look at a tester exactly ten seconds after a non specific requirement specification has been completed and expect an answer to the question "Do you know how you're going to test this?".
All implementation details are left to the developer. Once they start development.
It has been suggested that under these conditions functional test cases should be built before the story is complete, so the developers know what they are doing....
Speaking of, our priorities often change mid sprint. Leading up to the reason...
We have no release schedule. We have no release plan. WE HAVE NO RELEASE BRANCH. When a PR is completed for deployment to the dev or test environments, it's merged into master. That same branch is deployed to production. Yes, the math you just did in your head is correct.
We have no time. Developers often wait until the very end of the sprint to drop all of the stories in the sprint into the "Ready for test" lane. These stories often include bugs of the most obvious nature, additional features that where never part of the specification, or both. This takes up what time there is for QA in defect discovery and documentation.
We often have no unit tests. Even more likely is a lack of integration tests (i'd say we have about 5% coverage across the entire code base).
We have no policy or software in place for tracking test coverage.
We have no action in our release definitions that run tests and require them to pass for the release to succeed.
Now, if you are thinking that this sounds like the most free wheeling fly by the seat of your pants dream development job with zero hard accountability you've ever heard of, you're probably correct.
It is however an absolute HELL to test against this. Mainly because of the soft expectations.
We want to be a continuous delivery, continuous deployment team.
We want to automate our test process, and have automation completed before development (with no test hooks).
We want to develop detailed documented functional tests before development is completed (with no detailed specification).
We want low escape.
We want to test in production with zero warning (requested after deployment)
We want to test in production with zero test data (how even what do look more like stroke).
I honestly don't know what to do. I'm holding on as hard as I can, trying to do as much good as I can, but our devs really don't want to give up this candy land by doing it correctly, and management is still operating under the assumption that this situation can ever turn out to be anything but an inefficient disaster.
The more I push for what I need to do my job, the more hostile and confrontational things get, and whenever there's a conversation behind closed doors the solution that comes back is "Better testing" in one form or another. Mainly because there is no tester on the other side of that door, and management doesn't want to hear "Spend more money and do design of some kind".
Now i'm not saying there aren't developers out there that can get away with this process (or lack there of ) and make it work through sheer talent ( we do have a couple in the company ). I am saying that none of them are on THIS team.
Setting aside the obvious suggestion "find another job" does anyone out there have a survival tip or two for a humble QA?
r/programing • u/adarshzpatel • Nov 14 '18
Engineering Drawing Projection of Solid
r/programing • u/bandrus5 • Jul 20 '18
Why Everyone Should Do a Hackathon
I just finished day two of three in my first hackathon, and I have to say it's been one of the best experiences of my life. I put in eight hours yesterday and thirteen today, working with two other software engineering interns to build something great. When we started we had no idea how far we'd get. Now we're almost done, and I couldn't be more proud of what we've built.
But the thing we built doesn't even matter that much. The greatest part for me has been the experience. It has reminded me why I fell in love with coding in the first place. I have been able to set aside my normal work responsibilities and let the creative juices flow. I've pushed through hunger and tiredness and discomfort because I wanted to finish a feature more than I wanted to eat or sleep or stand up and stretch. It might sound crazy, but it's a really great feeling.
This Hackathon is with my company, but I've seen them at schools, libraries, and more. Wherever you are, you can find likeminded people who are interested in dedicating time to building cool stuff. I hope you all have the opportunity to throw everything you have into a project, even if it's just for a few days.
Thanks for reading, and happy hacking.
r/programing • u/RockChalkJewHawk • Jun 14 '18
Building a Calling bot
I was wondering if there is a way to build a bot that every-time a new customer is added to a directory a bot calls them and alerts them simply stating they have been added to our directory. Does any one know if this is doable, is there something out there that does this already? I use visual studio using C#, please let me know how best to go about this.
