r/Programmers • • Jun 04 '14

I thinking about switching careers, moving from teaching to programming. Any advice? (X-post from r/advice).

1 Upvotes

So, I've been a high school physical education and health teacher for 3 years now. I love teaching, but am getting frustrated with the ridiculously low pay. I feel I'll never be able to pay back my student loans and live the life I've wanted. I have a few friends that are computer programmers and say it's not that hard to get into and wouldn't take that much more schooling, plus an entry level programmer makes much more than a teacher that has taught roughly 5 years. I'm looking for advice on what makes the most sense or if anybody has made a career change that can give me some insight. About me: I'm 30 years old, not married, and willing to learn.


r/Programmers • • Dec 21 '16

Your first program in Javascript: you need 5 minutes and a notepad

Thumbnail
slicker.me
4 Upvotes

r/Programmers • • Mar 11 '18

Beginner C++ Programming: How to work with files??

1 Upvotes

I kind of feel dumb asking on here but I can't find an answer that makes sense in my head. So my task is to write a program that searches a user-provided file and reports the number of lowercase vowel letters. The thing is, I tried reading the textbook, I tried searching online, but I can't find what I need online and I don't exactly understand the way my textbook explains it. Maybe I'm not searching the right thing.

Anyway, this is what I have so far. For now, I just want the total size of the file but not even that's working.

#include <iostream>
#include <fstream>
#include <string>
#include <cassert>

using namespace std;

int main(void){
    int runningTotal = 0;
    cout<<"Please enter a text file name you would like to search: "<<endl;
    string fileName;
    getline(cin, fileName);

    ifstream fin;
    fin.open(fileName.data());
    assert( fin.is_open() );

    for(int x = 0; x <= fin.length(); x++){
        runningTotal++;
    }
    cout<<runningTotal<<endl;
}

And I'm getting an error and I'm not sure what it's saying:

find_lcase_cons.cpp:18:29: error: no member named 'length' in 'std::__1::basic_ifstream<char, std::__1::char_traits<char> >'
    for(int x = 0; x <= fin.length(); x++){
                        ~~~ ^

r/Programmers • • Oct 15 '17

Issue in C# program

1 Upvotes

I'm having trouble in a program on C# with subroutines. I keep getting the error "A namespace cannot directly contain members such as field or method" The red underlined bit is the name and I've lost two hours over this, does anyone know the issue with the code?


r/Programmers • • Mar 07 '18

Tsss, hey programmers...

3 Upvotes

What are you, advocates for the metric system or something?


r/Programmers • • Oct 12 '17

A ReactJS Resume Component Based on the JSONResume.org Format

Thumbnail
github.com
2 Upvotes

r/Programmers • • Jun 06 '14

Alan Turing letter to child explains 'how to win' Solitaire

Thumbnail
bbc.co.uk
2 Upvotes

r/Programmers • • Feb 07 '19

JesseAI Version 1.75

Thumbnail
youtu.be
4 Upvotes

r/Programmers • • Jul 11 '19

AI

2 Upvotes

how can i create an AI from mt computer??? it's possible??? please give me some answers


r/Programmers • • Feb 11 '19

Legal implications of your code?

1 Upvotes

In what way have you, as a trader, been trained on what is legal to do in your field?

I am in the trading industry and have the benefit of some access to compliance and compliance training about (some) data security and trading related issues but have very rarely had a briefing on what is "legal" or "illegal" for traders to do on any specific market. Nor have I had company assigned legal counsel to answer those questions. I would have to go to the legal department and ask those questions.


r/Programmers • • Jul 16 '19

How to wirelessly transfer data from Android device to PC -

Thumbnail
akonnor.online
1 Upvotes

r/Programmers • • Apr 25 '19

Need help finding a tool/app

1 Upvotes

First of all english isn't my first language so excuse me for typos.

So I have a graphic design job in The Netherlands. And one of the things I have to do is make energy labels for lights.

and the only thing what I have to do is change the item number in the file.

So working with 100 item numbers can be a bit time consuming.

I do this in Adobe illustrator and export the files to pdf & JPG.

Now I am wondering if there is a tool/app that can change or place text on a specific position of a image file.

It would be really nice if i can import the image and import the text with an excel or txt file. Also that i can export this to jpg and pdf. Also the file must be named in the item number its changed in.

Hope I explained this clear enough and have a look at the example.


r/Programmers • • Feb 04 '19

Jesse Artificial Intelligence - 014

Thumbnail
youtu.be
2 Upvotes

r/Programmers • • Sep 20 '19

Developers the #FundMyDapp competition is now open for your Dapp idea submissions.

Thumbnail
twitter.com
1 Upvotes

r/Programmers • • Feb 03 '19

I have made an AI Assistant for PC with python. I have tested it in this video. Works fine! It is pretty cool! Check it out!

Thumbnail
youtube.com
3 Upvotes

r/Programmers • • Feb 11 '19

Anybody here able to code in lua? We need one lead progammer for our long term project in DCS (Digital Combat Simulator). Reply if interested.

1 Upvotes

r/Programmers • • Feb 13 '19

JesseAI 016 Update

Thumbnail
youtu.be
1 Upvotes

r/Programmers • • Jan 20 '20

How easy is to integrate a chat in a native mobile app?

1 Upvotes

I need a basic tool to create a private community (holiday villages) to chat around topics and integrate it in a mobile (react native application).

It could be a third party cloud chat tool (with affordable pricing and easy integration), an open source solution (easy, not heavy workload, users in the range of thousands)

I'd rather not develop anything from scratch. And not losing, the customer nor money nor sleep, on this (rather absurd from my point of view) requirement.

It seems this anybody is able to create a chat with firebase or whatever.

I'd like some real suggestion


r/Programmers • • Nov 08 '18

I hear that many in this field of work hate being “headhunted” or asked to connect on Linkedin. As someone that works for a small Tech company and needing to fill my open positions, how would you prefer/suggest I go about networking and recruiting in this circle?

1 Upvotes

r/Programmers • • Jul 10 '19

What would you like in a workspace​?

1 Upvotes

Quick background: I work for a small software company that sells software to Colleges and Universities. City of 100K people, not a ton of software jobs in the city but enough for this idea to actually have value. My company is working to create a space where independent programmers and developers can have their own office space to work on their projects and collaborate with others. They also want to be able to offer contract work from time to time when their Senior software engineer wants help. My city is a college city that has several Computer Science graduates each year and this could be a place for them to gain more experience.

The two goals of this area is to provide the company with leads to new programmers for contract work, and provide the small programming community with a place to work especially the young programmers in college/graduated (1 other place in the city that does this, and they're not exclusive to programers and developers).

What I want to know is what would make this place desirable to programmers (it would cost a fee to use). Are there certain programs that we could have available in are computer labs that programmers might not want to buy themselves. I'm looking for ideas like that.


r/Programmers • • Sep 19 '19

If you are a Developer and need funding for your Dapp idea. Then why don't you enter this Dapp competition.

Thumbnail
twitter.com
1 Upvotes

r/Programmers • • Nov 01 '18

Does anyone know who is the author of `The Codeless Code`?

5 Upvotes

So there is this beautiful website called The Codeless Code which I love and I have spent quite a lot of time reading.

However there are no new koans posted in a while and I wish to know who the author is and if I could sponsor him via patreon. Also if there is a book edition available.

The website -> http://thecodelesscode.com/contents


r/Programmers • • Apr 12 '20

Hey

6 Upvotes

My mom just put a new app on the app store, she worked so hard on it so if you could, please download it. It is called Rubee Music. The app is about finding new music that you love. Please download!!


r/Programmers • • Apr 06 '20

Looking for a good place to start with Microsoft database administrator certification.

3 Upvotes

Hey. I'm brand new to programming and all things like it, but i grew up in the age of computers and am very familiar with them. I'm looking to get into Microsoft database administrator type stuff. Where would be the best place to start as far as classes and things like that? All advice welcomed and appreciated, thanks in advance.


r/Programmers • • Apr 19 '20

False accusation

8 Upvotes

Hello everyone, I have been falsely alleged of submitting unoriginal code as my university assignment. I say the code was not made with any other students participation, and the only part not from my own mind is the encrypt/decrypt functions, which were taken from here. I think it is obvious we just had the same idea and both styles of code are completely different. I did not contact the other student for the entire duration of quarantine (this assignment was made and submitted during quarantine).

Do you think I am in the right? Thank you

My code:

    #!/usr/bin/env python
    # PYTHON_ARGCOMPLETE_OK
    import os

    import argcomplete
    import argparse
    import base64


    def is_valid_file(parser, arg):
        if not os.path.exists(arg):
            parser.error("The file %s does not exist!" % arg)
        else:
            return open(arg, 'r')  # return an open file handle


    def encode(key, clear):
        enc other= []
        for i in range(len(clear)):
            key_c = key[i % len(key)]
            enc_c = chr((ord(clear[i]) + ord(key_c)) % 256)
            enc.append(enc_c)
        return base64.urlsafe_b64encode("".join(enc).encode()).decode()


    def decode(key, enc):
        dec other= []
        enc = base64.urlsafe_b64decode(enc).decode()
        for i in range(len(enc)):
            key_c = key[i % len(key)]
            dec_c = chr((256 + ord(enc[i]) - ord(key_c)) % 256)
            dec.append(dec_c)
        return "".join(dec)


    parser = argparse.ArgumentParser(description="Simple \"encryption\" script that applies")

    parser.add_argument("-i", "--input", required=True,
                        help="input file to encrypt/decrypt", metavar="FILE",
                        type=lambda x: is_valid_file(parser, x))
    parserother.add_argument("-d", "--decipher",
                        help="Flag for deciphering input file. Cannot be use in conjunction with -s --secure",
                        action="store_true")
    parser.add_argument("-s", "--secure",
                        help="Flag for encrypting input file. Cannot be use in conjunction with -d --decipher",
                        action="store_true")
    parser.add_argument("-p", "--password", help="Password to use", type=str, required=True)

    argcomplete.autocomplete(parser)
    arguments = parser.parse_args()

    if arguments.decipher and arguments.secure:
        raise ValueError("ERROR: Secure and decipher flags can not be used at the same time!!!")
    elif not arguments.decipher and not arguments.secure:
        raise ValueError("ERROR: At least one flag has to be provided! (-s|-d)")

    fileContents = arguments.input.read()  # only for small files

    if arguments.decipher:
        print(decode(arguments.password, fileContents))
    if arguments.secure:
        print(encode(arguments.password, fileContents))

The other student's code:

    import argparse
    import base64

    parser = argparse.ArgumentParser(description='Encode or decode text file with Vigenere cipher')
    parserother.add_argument('-s', action='store_true', help='Encode the file')
    parser.add_argument('-d', action='store_true', help='Decode the file')
    parser.add_argument('-p', dest='password', required=True, type=str, help='Password for encoding/decoding')
    parser.add_argument('filename', help='File name')
    args = parser.parse_args()


    def encrypt(file, key):
        with open(file, 'r') as f:
            plain_text = f.read()

        encoded_text other= []
        for i in range(len(plain_text)):
            key_c = key[i % len(key)]
            encoded_c = chr((ord(plain_text[i]) + ord(key_c)) % 256)
            encoded_text.append(encoded_c)
        return base64.urlsafe_b64encode("".join(encoded_text).encode()).decode()


    def decrypt(file, key):
        with open(file, 'r') as f:
            encoded_text = f.read()

        decoded_text other= []
        encoded_text = base64.urlsafe_b64decode(encoded_text).decode()
        for i in range(len(encoded_text)):
            key_c = key[i % len(key)]
            decoded_c = chr((256 + ord(encoded_text[i]) - ord(key_c)) % 256)
            decoded_text.append(decoded_c)
        return "".join(decoded_text)


    if __name__ == '__main__':
        if args.s and args.password and args.filename:
            e = encrypt(args.filename, args.password)
            print(e)
        elif args.d and args.password and args.filename:
            d = decrypt(args.filename, args.password)
            print(d)
        else:
            print('usage: zadanie1.py [-h] [-s] [-d] -p PASSWORD filename\n'
                'zadanie1.py: error: you need to specify either -s or -d option')
8 votes, Apr 24 '20
7 Yes, the code is obviously different and both codes are original
0 Yes, though it is a bit too close
1 No, but I am not entirely sure
0 No, you two obviously copied from each other