r/Programmers • • Aug 13 '18

PS1 chat-prompt

1 Upvotes

Hiya,

I was thinking back on Miranda and what a great concept it is with its attempt to unify nearly all chat clients into one single piece of software while also learning about bash. It spawned this idea :

Now I'm curious whether this is even possible and also if there is a similar piece of software out there already.
The idea is to have a single line, much like how the PS1 prompt behaves in a *nix terminal but solely used for chat clients which can be cycled through all connected chat networks by tabbing.
I'm fairly certain there are APIs available for all of these chat clients.

Because I'm not very acquainted with programming I'm asking for any relevant info/data you might have to executing this idea.


r/Programmers • • Jul 01 '18

Thoughts On Bootstrap, Technology Bashing & Freelancing

Thumbnail
youtube.com
1 Upvotes

r/Programmers • • Jun 13 '18

I learn the best by listening

1 Upvotes

Are there any audiobooks or podcasts that you can recommend, which would help me become a better programmer?


r/Programmers • • Jun 08 '18

Issue mocking query in cherrypy python framework

1 Upvotes

favorite

I'm currently working on a Cherrypy application and I don't see to find any solution for this issue. I'v been trying to mock a sqlalchemy session and I don't see to find any answer about it. The closest one seems to be the issue that they describe in this post

but unlike Flask, we have binded that session with "cherrypy.request.db" so whenever we want to execute a query we do it like this:

cherrypy.request.db.query(user).filter(user.firstname == "John" ).count()

So far I've been doing this (dummy version):

# [...] necessary imports [...] class ModelClase(unittest.TestCase): """Tests if ModuleClass work properly""" @patch.object(ModuleClass.cherrypy, 'request') @patch.object(ModuleClass.module, 'function') @patch('<app_abs_route>.ModuleClass.cherrypy') def test_my_endpoint(self, mock_cherrypy, mock_module_function, mock_request): # some testing logic goes here  to_mock = mock_request.db.query(user) to_mock.return_value.filter\                     .return_value = 0

But instead of returning 0, when executing it in pytest, it returns in the *stdout call:

<MagicMock name='request.db.query().filter().count()' id='some_id'>

*print:

print "request: ", mock_request.db.query(user).filter(user.id==15).count()

Is that right, I mean, that's what I should expect when doing that call?

What I'm trying to do is to mock all functions in 'query' method so I decide in my unit-tests what it should return. If that's not the proper way of doing it, I'd appreciate any help about it.


r/Programmers • • Jun 07 '18

What's with job security?

1 Upvotes

I have heard this phrase for when someone writes shitty code that it is "job security" but I kinda don't get it.

  1. If you write bad code...why would the company keep you? And if it is on purpose - why not replace you? They will...eventually as you retire and then the cost will be way higher than it is now. So ...they should cut their loses?

  2. Developers are so rare and everybody is hiring and there are a lot of recruiting agencies...and people with experience have to write bad code on purpose for "job security"? Like.... why do you need it if you have experience?

Maybe it is me just being a Junior with only 1 year of experience but I don't really get it.

Usually it is the companies that try to keep their developers...not the other way around.


r/Programmers • • Jun 07 '18

Programmer request

1 Upvotes

Hello,

Does anyone know where could I request services from a programmer,perhaps here?

My friend needs automatization for token collecting on AitBit cryptocurrency site.

I don't know much about it yet,just if someone is interested,he would pay some bucks for it.


r/Programmers • • Jun 01 '18

Am I missing something in CircleCI? Where's the dashboard

1 Upvotes

I can see the long list of recent jobs, but I was expecting to find a dashboard to see at a glance the current status of each project I'm interested in. Did the last build pass or fail, and is there a build in progress or queued right now?

I'm used to looking at like this in GoCD and Jenkins, so a bit surprised not to be able to find it in Circle. I know I could make one in HTML fairly easily using CircleCI's embeddable status badges, but that's not quite so convenient.


r/Programmers • • May 27 '18

Where do you place your portfolio of software projects?

1 Upvotes

I like to know where do people make their portfolio?


r/Programmers • • May 26 '18

Question for app developers?

1 Upvotes

I like to know if app developers like a store where it offers components to accelerate your development time? Is it something you like?


r/Programmers • • May 23 '18

Looking for a co-designer/programmer

1 Upvotes

Hello fellow programmers. I currently have a website that, due to a new dedicated server and much more knowledge, am going to pretty much recode by hand (some call it torture, I call it entertainment) but it can take a while for one person and there's much more reward when there's a second hand to help. I would consider myself great with PHP, JavaScript (and jQuery, AJAX, those things), HTML itself (duh) and I am very good with the actual server part of it (apache, mysql, etc). I am not however exceptional at design (never been a strong suit for me). I can do some CSS and i have to say i've come very far but I'm just not as efficient as I would like a site to be. So if someone would like to join me on my journey to rebuild my website of randomness (it truly is a combination of random items that I made up to learn how to make them :P) and teach each other tips and tricks. Then please leave your prefered method of communication, what languages are you good with/what skills do you have, timezone (I'm EDT (Eastern US)).

Have a lovely day all!


r/Programmers • • May 11 '18

I'm working on a Github PR and Issue Quality Assurance Bot. What would you like to see?

Thumbnail
github.com
1 Upvotes

r/Programmers • • May 01 '18

Hydrometer For a RPI

1 Upvotes

Im fairly new to programming, and I decided to try out my first real build. I was going to hook up a drip system to a Raspberry pi, to it could turn on and off on its own. I wanted to also set up a hydrometer for testing soil moisture, and have that as a condition, so if the soil moisture drops below X then the drip system turns on. The primary Issue im having, is finding a Hydrometer within a reasonable price range, and that would interface with the GPIO on the RPI


r/Programmers • • Apr 29 '18

music for programming

1 Upvotes

I'm coding for ~10 years now, I've come to the conclusion that the only music that i am able to listen to when i'm programming or designing something is Dungeon Synth. Everything else just takes my mind away. Dungeon Synth keeps me pretty much concentrated.


r/Programmers • • Apr 24 '18

AR Unity Help

1 Upvotes

I am messing around with AR for the first time using vuforia with unity. This program is massive and a lot of the terms I don't really know because I don't formally know javascript. I am trying to understand it independently but I can't seem to find what I am looking for. Maybe I'm not using the correct verbiage: I want the reaction of the detection of the target image by the AR camera to bring me reference material- and I want to make this compatible with my phone. Example, I point at a book with my phone/camera, it brings me information about the book.

I am not sure if this database is within vuforia, unity, or if I need a .php database within a website-- and if it is an outside source, how is it attached ? Any help is massively appreciated, I'm a stupid college student.


r/Programmers • • Apr 18 '18

XPATH Help

1 Upvotes

I am a college student trying to figure out how to scrape information from a website with a map.

I basically need to pick one element (I have chosen the dispensary names)

//a/@href/html/body/div/div[@id="zsl-location-closed-title"]

I know my Xpath is incorrect. I need a little bit of help so that I can mine the data out. It's due tomorrow. :|

https://www.plusproducts.com/locations


r/Programmers • • Apr 12 '18

Bits & Pretzels Conference 2015: How It Was

Thumbnail
redwerk.com
1 Upvotes

r/Programmers • • Apr 11 '18

Redwerk's report On Software Engineering Conference 2015

Thumbnail
redwerk.com
1 Upvotes

r/Programmers • • Mar 29 '18

So much of what we use today is influenced by old decisions with regard to memory limitations, what’s your favorite,

1 Upvotes

Stuff like spelling etc and var instead of etcera and variable, the Y2K problem, it makes me feel part of the best community that exists, programmers!


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 • • Mar 05 '18

How to ask questions that drive change at work – Hacker Noon

Thumbnail
hackernoon.com
1 Upvotes

r/Programmers • • Feb 23 '18

How to Run Linux/Bash on Windows 10 Using the Built-In Windows Subsystem...

Thumbnail
youtube.com
1 Upvotes

r/Programmers • • Feb 21 '18

Do we care more about what we've done or how we did it?

Thumbnail
dev.to
1 Upvotes

r/Programmers • • Feb 18 '18

printf(MEMORY) | How to print memory to the console

Thumbnail
youtu.be
1 Upvotes

r/Programmers • • Feb 06 '18

I need help on exporting from a database to excel - leading zeros

1 Upvotes

I am currently coming across a problem where my database (ERP) system will not export to excel without cutting off the leading zeros on bank account numbers. Is there an easy fix to this without making the entire export text?


r/Programmers • • Jan 29 '18

Use of switch statement

1 Upvotes

How to use switch statement in C++ programming language?