• Breaking News

    Wednesday, April 3, 2019

    What's your take on Uncle Bob? Ask Programming

    What's your take on Uncle Bob? Ask Programming


    What's your take on Uncle Bob?

    Posted: 03 Apr 2019 12:30 PM PDT

    I've read his work but never heard him speak until recently. SOLID makes sense to me. Clean code makes sense to me. Recently I watched this: https://www.youtube.com/watch?v=QHnLmvDxGTY and I came away thinking he's a bit of a "get off my lawn" kind of guy.

    submitted by /u/SmarterThanAllOfYou
    [link] [comments]

    how do i make a twitter bot that only tweets the same image periodically?

    Posted: 03 Apr 2019 09:48 PM PDT

    hi!! sorry if my question is a silly one, this is my first time programming a bot or programming something in general and i genuinely have no idea what im doing. i already applied for the API things, acquired my consumer and access token keys ect. but after that im p clueless

    help would be more than appreciated!!

    submitted by /u/reiss013
    [link] [comments]

    Where do you go to find out what you need to know to create a project? Or if that project is even possible?

    Posted: 03 Apr 2019 09:41 PM PDT

    Say you have an idea for a project but you don't know what it would require to code it. Is there a good place to go to find out what you need to research or know in order to do it, or if it is even possible?

    For example, I was wondering if it would be possible for me to code a program where, as I am playing a PS4 game, (I'm thinking a baseball game like MLB 19: The Show), the program can see where the ball is and when it gets to a certain distance from the batter, it would tell the PS4 to press X to swing. So I'm curious if it is even possible to connect your PS4 to your computer and write a program that can see what is on the screen and simulate the user hitting a button at a certain time.

    I am decent at C++, but I'm still fairly new and I'm still a student at university. Most of the time, what stops me from pursuing a project is that I don't know what I need to research. Like I can't look up how to do something if I don't know what to look up.

    I would appreciate any help. Thank you!

    submitted by /u/1infiniteLoop4
    [link] [comments]

    I'm a TA and have been told I am teaching Data Strictures next week, need some help re makefiles and other topics

    Posted: 03 Apr 2019 06:57 PM PDT

    As the title says, I have been tasked with teaching Data Structures class next week. Awhile ago I made the suggestion that they include makefiles when they submit their code (I am also the grader) because otherwise it can be a PITA to compile ~30 of them, especially when they have a bunch of files/headers. Well now the professor wants ME to teach it to them, aaand I've done it a few times but I am by no means an expert. I am pretty sure no one in the class has actually written a makefile before. However, most of them use Visual Studio and a couple have argued that they don't need to learn how to do a makefile because VS handles it for them.

    When they inevitably ask me why they need to learn this, what should I tell them? Do you agree it's something they should know? Why or why not? Besides the fact that it makes my life a lot easier, I am thinking I'll just tell them it's just good to know because they makefiles can make you more efficient with larger projects.

    I have never taught an actual class before so I am a bit nervous they will ask me something I don't know, I'm just a Junior after all. Prof wants me to make slides and everything, so I need to brush up a bit. Any resources or cool tutorials you like that I could show the class?

    submitted by /u/AK_Code_Red
    [link] [comments]

    How to change DOM based on api request

    Posted: 03 Apr 2019 05:20 PM PDT

    Hi all, Thanks for any help that you provide in advance! I've been learning to code for the last year, and I'm actively building my first app.

    I'm using: - Front End: HTML, CSS, Bootstrap (with MDBootstrap add-on), jQuery - Back End: Node.JS (with Express, Passport, Cookie-session) and MongoDB

    My question I believe is relatively simple, but I just haven't been able to piece together what I need to build to realise my vision for this app. Although the front end is more complex, the fundamental functionality of this app is to authenticate users (using Google Sign-in) and then display either RED or GREEN based on a shared Google Calendar's event data.

    On the Back End, I'm authenticating users then pulling their Google profile data. Authenticating using Google gives me access to an AccessToken and a RefreshToken. Everything up to this point is fine and seems to work well (at least for a first attempt).

    Anyway, the problem is getting access to the shared Calendar Event data on the Front End so I can set up logic to choose what is displayed to the user. I can't seem to be able to make an API call because I need the Access Token/Refresh Token on the Front End and I can't see how I can pass that data through. I assume that because the code for the API call is on the Front End, this might not be the best way to go about this?

    I'm partial to stripping down the app and starting again, but I don't know if what I've built so far is already on the right path, or if I need to follow a different path altogether? Really all I'm looking for is a guidance on a structure/path that I should follow to get this done as I'm lacking a lot of direction at the moment.

    I'd really appreciate anyones help here.

    Thanks all

    submitted by /u/Startupstartingup
    [link] [comments]

    Looking for a web based IVR that is the best at recognizing letters and numbers.

    Posted: 03 Apr 2019 04:54 PM PDT

    We are trying out Twilio which so far has been extremely bad at recognizing alphanumeric characters. (i.e. a combination of letters and numbers). So are trying to find any service, which is web facing, that is good at understanding letters and numbers. When I call the USPS they are excellent at getting a long string for a tracking number and understanding it.

    At the end of the day, am looking for a service that can handle phone calls (IVR) and correctly parse letters and numbers, and send that info during the phone call for verification to a URL, which would reply back with a yes or no.

    Problem we are having now is simply with the voice recognition side of things, which Twilio is not being very helpful with.

    submitted by /u/TheDataWhore
    [link] [comments]

    Resources on precautions for a clean production backend?

    Posted: 03 Apr 2019 12:48 PM PDT

    I'm trying to set up my first (public) backend. For that I'm using Docker with a container with my app, one for nginx and one for Postgresql. I can manage to get things running, but my problem is (especially with postgres) when the guides say "you wouldn't want to store this secret in an environment variable in production" or "definitely make sure to make appropriate db roles for production". I don't know much about Ops or db administration yet, but I want to get this stuff right and have a reasonably secure setup.

    Is there any place where more emphasis is put on these topics? Please don't say postgres docs, because my problem is not how to do things, but what (for example user roles and what access restrictions are mostly used).

    Thanks a lot!

    submitted by /u/mymemorablenamehere
    [link] [comments]

    So why didn't you decide to go into the cyber security world given how hot it currently is the plethora of job opportunities available within it?

    Posted: 03 Apr 2019 04:22 PM PDT

    How do AIs work that learn a language?

    Posted: 03 Apr 2019 04:16 PM PDT

    I know some AI-algorithms like backward learning, but I cant imagine how AIs work that learn how to do dialogs like cleverbot for example.

    submitted by /u/actopozipc
    [link] [comments]

    How a programming language works?

    Posted: 03 Apr 2019 06:22 AM PDT

    Does anyone have any good reference material for how a program/programming language works? I feel like having a comprehensive understanding of what happens at a machine level will be more than invaluable to me. I don't know what to call the group of concepts (or what they are) in order to begin my research.

    submitted by /u/BigBand_it
    [link] [comments]

    Does anyone know of a KBA (knowledge based authentication) provider with an API?

    Posted: 03 Apr 2019 11:43 AM PDT

    I am in the process of searching for a KBA solution. I need something that I can use to verify the identity of users using questions. Does anyone know of an affordable solution for me?

    submitted by /u/ChurneyInMyGurney
    [link] [comments]

    Library/language recommendation for "generative visual rendering"

    Posted: 03 Apr 2019 03:24 PM PDT

    Hi,

    I'm thinking I want to play with some math and make pretty animations. Something like that. As for language C++ sounds like a good idea for performance sake. Maybe JS since tools are more oriented toward the graphical stuff. I'm open to recommendation tho.

    Using a game engine was another idea, but I think I'd rather work "closer to the metal" so to speak.

    OpenGL is maybe a bit too close for me taste. Something in the middle would be neat. Looking for any suggestions!

    Thanks

    submitted by /u/xeyve
    [link] [comments]

    People here who are web developers, what should everyone know before learning development and what skills do most employers look for other than just programming?

    Posted: 03 Apr 2019 03:23 PM PDT

    Programming for iOS on Windows with Xamarin.

    Posted: 03 Apr 2019 03:10 PM PDT

    I have a couple of quick questions. I have a moderate amount of experience with C# but absolutely no experience with the Apple software development ecosystem so I'm a little lost. I know with iOS development a Mac is required but is it needed for every build action/compile or is it more about signing using your developer certificate in order to publish on the AppStore? I have an old iMac which I mostly use as a glorified TV right now and I'm not even sure it'd be recent enough or powerful to compile my builds, especially if it's needed for each compile (is it?).

    Ideally speaking I read it's possible to virtualize Mac OS although with some issues but all the guides I found are kind of old and I'm not sure it's still possible and, if possible, it'd be great being able to use Visual Studio on Windows and use the virtualized machine to do whatever it needs. Is it just a quirky idea of mine or is it a possibility to virtualize Mac OS and use it alongside with Windows to develop for iOS?

    submitted by /u/nicktheone
    [link] [comments]

    Best Technologies to Create an eCommerce website?

    Posted: 03 Apr 2019 12:19 PM PDT

    For background, this is meant to be a school project, so I wouldn't place that much emphasis on security. It would be cool to implement some payment processing like Paypal or credit cards though. The timeline of the project is about 3 months. Is this reasonable for a single person to do? How about a group of 4, 3 of whom don't have web development experience?

    I was thinking about using React for pages that display items on sale, and HTML with Bootstrap for pages such as listing items. For Backend, using Javascript, Node, Sqlite and Express. Also using Amazon Product Advertising API to do automatic pricing. Does anyone know what sites like Amazon and Ebay use for their tech stack? Do you think this is reasonable tech to use?

    Also, how difficult is it to get API for payment processing?

    submitted by /u/comingup2022
    [link] [comments]

    How long would a Tower of Hanoi That has 64 discs take to solve recursively? C++

    Posted: 03 Apr 2019 12:15 PM PDT

    I was looking at a recursive tower of Hanoi program where the function is called 2^n-1 times. My roommate asked me how long it would take to do a tower of 64. I honestly didn't know the answer so I'm hoping someone could help me out here, because I'm interested in the answer, instead of just waiting it out.

    Also what would the Big-O notation be?

    This is the code I was looking at:

    void towerOfHanoi(int n, char from_rod, char to_rod, char aux_rod) { if (n == 1) { printf("\n Move disk 1 from rod %c to rod %c", from_rod, to_rod); return; } towerOfHanoi(n-1, from_rod, aux_rod, to_rod); printf("\n Move disk %d from rod %c to rod %c", n, from_rod, to_rod); towerOfHanoi(n-1, aux_rod, to_rod, from_rod); } int main() { int n = 4; // Number of disks towerOfHanoi(n, 'A', 'C', 'B'); // A, B and C are names of rods return 0; } 

    got the code from GeeksforGeeks.org

    submitted by /u/Amxela
    [link] [comments]

    How to pass array of associative arrays from php to python3

    Posted: 03 Apr 2019 12:11 PM PDT

    In php I have an array of associative arrays which looks like this:

    array (

    0 =>

    array (

    'ID' => '82',

    'Title' => 'My Title',

    'Todays_Date' => '04/02/2019',

    'Requester' => 'developer',

    'Request_Type' => 'New',

    'Status' => 'Scheduled',

    ),

    1 =>

    array (

    'ID' => '83',

    'Title' => 'My Title 2',

    'Todays_Date' => '04/03/2019',

    'Requester' => 'buisness',

    'Status' => 'Scheduled',

    ),

    )

    I'm trying to pass this to a python script but cant get it to work. I've tried many combinations of encoding the entire array vs encoding each index in the array and then using json.loads in the python script but I am not getting anywhere. Logically I'd like to be to access the data in python like this array[0]['ID'] = 82

    EDIT: After everyones helpful suggestions I was able to pass the data over and read it by doing the folowing:

    1. json encode the array of associative arrays
    2. Fix my exec call
    3. json.loads the string in python

    Thank you all for your help!

    submitted by /u/whiskeymop
    [link] [comments]

    How to use Javascript in HTML?

    Posted: 03 Apr 2019 11:59 AM PDT

    Hello, people. I am new at programming and I want to just create a HTML project, for example create a real variable, button and then if I press it my variable change it's value. How can I do this?

    submitted by /u/ResponsibleMirror
    [link] [comments]

    How to prevent Octave from rounding results after a large matrix division

    Posted: 03 Apr 2019 11:19 AM PDT

    Hi.

    Im trying to load a large matrix with values between 1 and 255, then squash all the values between zero and one.

    I figured a good way to do this is divide the whole matrix by 255, but then it converts every 255 to one, and every other value to zero. How do I prevent this?

    Specifically I'm trying to do this with an image file.

    submitted by /u/Orephel
    [link] [comments]

    calculator coding with 2 seperate calculations

    Posted: 03 Apr 2019 09:18 AM PDT

    I'm not sure how to phrase this but Im struggling with creating code for my second lblOutput.

    the question requires you to make 2 calculation boxes in a single Jframe form. the addition code is:

    String strInput1;

    String strInput2;

    int intInput1;

    int intInput2;

    int intOutput;

    intInput1 = Integer.parseInt(txtInput1.getText());

    intInput2 = Integer.parseInt(txtInput2.getText());

    intOutput = intInput1 + intInput2;

    lblOutput1.setText(String.valueOf(intOutput));

    how do i add input 3 and 4 to the code and the anwer displayed on lblOutput2?

    submitted by /u/Elite-Novus
    [link] [comments]

    How do OOP languages work?

    Posted: 03 Apr 2019 08:57 AM PDT

    I'm aware OOP is not a particularly new development, but I am wondering how can an OOP language be made (with a compiler or interpreter) if the language the compiler or interpreter uses is not OOP itself (like Python, which apparently uses C as its implementation language)? Essentially, how does one emulate OOP? (How are OOP-specific constructs like polymorphism, inheritance, classes, etc. created in a non-OOP, procedural language?)

    submitted by /u/nanoman1
    [link] [comments]

    Is there a reasonable way to keep API authentication secret when it's embedded in the frontend?

    Posted: 03 Apr 2019 07:49 AM PDT

    For background, what I essentially have is a web form that's intended to submit directly to a data extension (a DB table, basically) via the Salesforce Marketing Cloud REST API.

    I'm trying to establish whether there's a way to do this without exposing the API authentication details to the internet and without having to essentially bounce the form data through a separate backend server.

    Is this possible?

    submitted by /u/666lumberjack
    [link] [comments]

    2D navigation via Bluetooth Beacon access points

    Posted: 03 Apr 2019 07:37 AM PDT

    Due to a school project I was asked to install an indoor navigation system. I was told to not worry about the application since another party would take care of that eventually. Now I've installed a stable bluetooth infrastructure via bluetooth low energy beacons and am asked to build a web application anyway, which runs on the school servers and is accesable without downloading an app, just simply by scanning a qr code that navigates you to a site in your mobile browser, which features a map and the ability to select certain points and be directed to them, with help of those beacons.
    I'm not really a programmer and only know basic Js and I'm not sure by which means it is possible to create such a thing, without any application that you need to install. I have a 2D room plan. Is this possible with Js? If not any reccomendations on how it should be done? Its fair to say that I'm a noob when it comes to programming so I hope you don't mind my amateur way of explaining. Thanks in advance.

    tl;dr: BLE Beacons are installed in a venue and I need to figure out a way for both apple and android users to open a navigation application in their browser where they can select, where they want to be directed to and then be directed.

    submitted by /u/bokelinator
    [link] [comments]

    [PHP] Having trouble with classes

    Posted: 03 Apr 2019 07:10 AM PDT

    I am making a music website in PHP. I need a utility to make an artist, each artist has songs. I have created a createArtist class which will make a new artist. It has the variables

    $ArtistName = Rhianna

    $ArtistGenre = R&B

    $ArtistLabel = Sony

    I can create an $ArtistSong but artists will have many songs. How can I give my artist multiple songs?

    submitted by /u/dietderpsy
    [link] [comments]

    No comments:

    Post a Comment