• Breaking News

    Tuesday, August 6, 2019

    What is the most fucked up code you have ever written? Ask Programming

    What is the most fucked up code you have ever written? Ask Programming


    What is the most fucked up code you have ever written?

    Posted: 06 Aug 2019 06:51 AM PDT

    Having some trouble figuring out Inigo Quilez's Volumetric sort

    Posted: 06 Aug 2019 07:04 PM PDT

    Looking for my next job as a software developer

    Posted: 06 Aug 2019 02:47 PM PDT

    I've started searching for my next gig as a software developer and wanting to get some advice on a job that has interested me. I've had a recruiter reach about to me about a role that uses the following:

    Current Stack: PHP 7.1+ Typescript Laravel React Git Bash AWS Docker SQL Elasticsearch

    Legacy Stack: PHP 5.6 Go Javascript CakePhp Less Prototype Express jQuery Backbone

    These are mostly new technologies I've never used but the recruiter mentioned to me that this company is very open to teaching new employees these stacks. My educational background is heavy in C#, .Net, MVC, HTML/CSS/JavaScript and I've also been learning React on the side for awhile. I'm still pretty junior level (6 months of professional experience) but I'm always eager to learn new technologies. I'm very interested in React. Love making new projects and working on some sites for friends and family. So my main question is, for someone looking to work with the newest technologies, would this be a good role to shoot for?

    Open for any discussion with this so thanks for reading!

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

    Networking / TCP Question

    Posted: 06 Aug 2019 04:49 PM PDT

    I have an application that is communication cross language (through localhost) via a TCP protocol. Is it bad practice for the server to build up a queue of requests in a background thread while the main thread dequeues and handles the leading request?

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

    Establishing Connections and Data Transfer with Devices Over Networks

    Posted: 06 Aug 2019 04:43 PM PDT

    Hey, I'm looking to establish connections with my current devices within my household to create a relatively seamless transfer of data over my network. I know there's a lot of applications already that accomplish this but I want to build one from scratch. A while back I looked into sockets with Python and Java but that only gave me a basic connection. Can someone kindly elaborate on what areas or tools I'd need to research and use in order to accomplish my goal? Thank you in advance for your responses.

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

    CREATE OR REPLACE VIEW Question

    Posted: 06 Aug 2019 03:50 PM PDT

    I want to know, what does this statement do on a low level? My understanding of a view is that it's basically like a stored SQL query. Presumably upon creation, the query that creates the view is put into storage, to be called upon whenever someone queries the view. What happens when it's replaced with a new/updated query? I can only imagine that the old query is deleted and replaced with the new one? I'm not sure if this is a dumb question..

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

    Why does Stockfish convert move bitboards into a ‘compressed’ move list?

    Posted: 06 Aug 2019 01:59 PM PDT

    Stockfish represents a chessboard as a 64-bit integer for each piece type. There are 64 squares on a chess board and each square is either occupied by that piece type (1) or not (0).

    Very roughly, these integers can also be viewed as the addresses in an array that holds that board's list of moves, represented as 64-bit numbers whose 1s are the squares the piece can move to: in short, board representations are pointers to compile time move lists

    Why are these 64 bit integers then 'compressed' into a list of individual bitfields for each move? This list representation takes up more memory after 'compression' and the resulting moves have to be expensively decompressed back again to use them. The old respresentation is also ideal for ABM instructions like LZCNT and POPCNT.

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

    Simple Java code correcting errors school project

    Posted: 06 Aug 2019 12:42 PM PDT

    (Java)

    Hey, so I need some coding help! I took a coding class, and I was expecting it to be some simple HTML stuff, however I was wrong. I'm almost done with the class but there are a few projects I don't understand. Can one of you please help me? They're really simple, I just cannot wrap my head around it. Willing to throw some money your way to help me with the rest (5) of my projects; if you're able to help with this one, I believe they are all like this one. Like I said I know it's simple, I just have problems fixing the errors.

    Here is the project details, so the code makes sense. (there are errors in the code)

    • Create code to declare and initialize at least five integer variables with values of your choice. HINT: int yourAge = 40;
    • Create code that displays each variable name and its initial value on a separate line. HINT: System.out.println("myAge = " + myAge);
    • Using the operators for multiplication, division, modulus, addition, and subtraction, replace the current variable values with new values. HINT: myAge = myAge + 25;
    • Create code to display each variable name and its new value on a separate line. HINT: System.out.println("totalAge = " + totalAge);

    Code:

    *Description: these are the basic required components of a simple Java program

    * this program prints Skeleton code to the screen as a string literal

    * declares and initializes three variables, manipulates the data values

    * within those variables by using arithmetic operators to change the

    * Values held by the variables, and prints the contents of the variables to

    * the screen/output box

    ************************************************************************

    */

    public class descriptiveFileName

    {

    public static void main(String[] someVariableName)

    {

    Int myAge = 29;

    Int yourAge = 40;

    Int totalAge = 0;

    Int totalAge = 0;

    System.out.println("myAge = " + myAge);

    System.out.println("yourAge = " + yourAge);

    System.out.println("totalAge = " + totalAge);

    // this block prints the variable name, the equal sign, and the value stored in it

    totalAge = myAge + yourAge;

    // puts the results from the right-hand side of the equal sign into the variable on the left of it

    System.out.println("totalAge = " + totalAge);

    // prints new value stored in totalAge

    System.out.println("Skeleton code");

    }

    }

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

    Are there any tools/libraries for general purpose boilerplate code generation?

    Posted: 06 Aug 2019 05:07 AM PDT

    Are there any unopinionated general purpose tools or libraries out there for automating boilerplate code generation?

    For example, I find myself creating a lot of React components in my projects, and every time I create a new component I need a story file (for Storybook), a test file, a style file and the component itself, and they all require some amount of boilerplate code in them. Copying and modifying all this boilerplate is becoming really time consuming.

    There's also a certain amount of boilerplate when creating new models or views in Django, involving adding a block of code, adding a line to an array in the urls.py file etc.

    There are also several other repetitive tasks I would like to automate that would be perfectly solved by a templating system

    I want to avoid opinionated and language/framework specific tools, since I would like to be able to create my own customized boilerplate generation commands that fit perfectly in my project, needing little to no modification after use.

    I've Googled to the best of my ability, but I'm unable to find any tools or libraries that attempt to solve this problem.

    Does anything like this exist, or is it something I would have to create myself?

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

    Book of Random Numbers

    Posted: 06 Aug 2019 07:42 AM PDT

    So I stumbled accross this on Amazon https://www.amazon.co.uk/Small-Book-Random-Numbers/dp/1452818363 today and it got me thinking.

    'Is a book of randoms numbers a book of random numbers?'

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

    Help - Show text based on various dropdown values

    Posted: 06 Aug 2019 07:33 AM PDT

    So i´m trying to create a really simple website that shows the price of doors and since there are a lot of models i figured the best way would be via a dropdown. So imagine I have 3 dropdowns and I choose (for exemple) "door 1" "black" "2000*800 mm" then it would display a price. However if I choose the same things but instead of black i would choose white, it would display a different price. I've tried to find something but I can't and I'm guessing that it has something to do with the <select> values. Any help is parecciated and thank you so much

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

    How to ensure data received from a client is encrypted? Is that even possible?

    Posted: 06 Aug 2019 06:13 AM PDT

    I've had an idea banging around in my head for a chat program for some time now. The idea is simple: client sends message to server, server sends that message to another connected client. Looks like this:

    [client] --> [server] --> [client]

    And then in reverse, allowing for two way chat.

    [client] <-- [server] <-- [client]

    Exactly how any other chat service works, right? The server barely does anything: it just moves text from client to client.

    It then occurred to me that any data could be sent this way. The server would be a generic "transmission server" that simply takes data + an address and sends it to the correct address. Any application could be on either end.

    In this way you could write applications that interact with other applications over the internet without having to pay or maintain servers - just send data through the transmission server to any client you like!

    However, I'm also very interested in privacy. One thing I would like is for all data passing through the transmission server to be encrypted. That way, the server would never see any of the data its moving - just a bunch of garbled nonsense and a client to give it to, who would then unenecrypt it at their end. The transmission server would act like a mail room - they receive envelopes and send them to different destinations, all the while never knowing whats inside.

    The issue with this is that this means I have to ensure that the applications connecting to my transmission server are sending me encrypted data.

    Is it possible to ensure that data received is encrypted? Lets say someone writes a shitty application and accidentally sends their data in plain text - how would I know to reject this data/connection?

    Any help is appreciated.

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

    Tips for resources about coding for dynamic music

    Posted: 06 Aug 2019 05:23 AM PDT

    Using Unity3D id like to get into programming dynamic interactive music. I have some ideas of what id like to accomplish but id need a way to make the code aware of what is going on in the music at the moment. Like

    Is it on a beat at the moment?

    What key is the song in?

    What chord is playing at the moment?

    And all sorts of metadata. One way of doing this is to use a text file and just write down all the metadata with timestamps. But this seems very clumpsy. Im sure there are other ways.

    Ive heard about metadata being coded into wave or mp3 files. Is this a possibility? How is it done and how is it read?
    Also ive heard of using midi files. Ive been looking for resources on how to do these things but cant really find anything.
    Is there maybe any frameworks or tools?

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

    Remove Https/http

    Posted: 06 Aug 2019 05:14 AM PDT

    I have a list of domains, some have https and http before and some don't. I want all of them to be on the same format (without http and https).

    I've tried a bunch of online tools but unsuccessfully.

    Any help regarding this?

    Thanks

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

    What tool did Cambridge Analytica use to scrape user data?

    Posted: 06 Aug 2019 04:59 AM PDT

    I recently watched the Cambridge Analytica documentary and was wondering what scraping tool they used and which machine learning algorithms they used to classify which users have a certain personality.

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

    Need Help with using PyFirmata to control Arduino

    Posted: 06 Aug 2019 04:08 AM PDT

    Heyy guys, so What I am trying to do is make a web page which I can use to control my analog and digital pins of Arduino. I want exactly similar what is being done in this video https://www.youtube.com/watch?v=FfJ2Rk4sjH8 but on a web page. I will be running Flask server to send the responses and uploading the code. Please tell me how should I proceed with this. Any help appreciated. Thanks a lot.

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

    How do you measure how much the CPU is struggling?

    Posted: 06 Aug 2019 12:39 AM PDT

    My chess program computes progressively better responses on all CPU cores while waiting for the user to make a move.

    My laptop heats up, fans start whirring, the user interface stutters.

    I have added an 8 second timer after which the threadpool waits instead of finding new moves.

    However 8 seconds is arbitrary, and really I want to know how hot the machine is or how much it is underclocking. Is this possible? I'm writing in C++ with an Objective-C user interface.

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

    What's the difference between solution architect and software architect and project manager?

    Posted: 06 Aug 2019 12:26 AM PDT

    Are they essentially the same thing? They all seem to be responsible for making technical decisions for the project.

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

    I took a course on python basics for a month and now want to get into machine learning. I've heard numpy and pandas are good libraries to learn. What is a good place to learn these?

    Posted: 05 Aug 2019 11:31 PM PDT

    No comments:

    Post a Comment