• Breaking News

    Sunday, July 1, 2018

    Your Opinion on TypeScript so far Ask Programming

    AskProgramming

    Your Opinion on TypeScript so far Ask Programming


    Your Opinion on TypeScript so far

    Posted: 01 Jul 2018 05:43 PM PDT

    I'm 30 minutes in to reading TypeScript and it looks promising. I'd want to hear your opinion here than going over Medium articles telling me on just how good TypeScript is. My goal is to eliminate crazy debugging issues I face when my project gets larger. I mainly use JavaScript for React/ React-Native.

    Does TypeScript help you against issues you were facing before while developing React/ React Native or other frameworks? How? Here are some of the issues I face doing JavaScript web-dev (even with loose ES6 standards):

    • Issues with libraries monkey-patching native objects.
    • Poor JavaScript standard library. (e.g. 'in' is pretty much useless)
    • 'in' is so useless they force non-enumerable properties to be iterable. To my surprise, people fuck up Object.prototype in React-Native libraries.
    • People try to go fancy with Prototype Inheritance to make simple stuff look like some crazy shit.
    • Returns 'undefined'. Enough said.
    • (insert other issues like float-based array index, scope of var, etc.)

    Some issues may be related to just Node being Node or the trashy DOM API. Again, I have yet to discover what TypeScript is all about for you guys.

    (PS: I had a friend telling me JavaScript is prefect as long as you "don't write bad code". I believe this translates to "don't misclick the "Launch Missile" button." We want a good design for the programming language we use.

    Good day, everyone.

    Ionwyn.

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

    Application Programming with the C family

    Posted: 01 Jul 2018 03:30 PM PDT

    I want to work on a game as a personal project. I don't have the requisite game-dev knowledge, I don't expect to get very far, etc.--just getting that out of the way ahead of time. I'm trying to decide which language to use. Looking for input.

    C is my favorite language. I have a reasonable amount of experience managing large C projects, but they always get pretty ugly. Are there any good techniques for organizing large C projects to overcome the lack of OOP? I know you can build your own vtables and stuff to approximate some object oriented features, but my understanding is that the benefits never justify the complexity.

    I figured I should learn C++ at some point. Since I keep hearing about the "wrong ways" to use the language, I bought Stroustrup's book. The language seems ugly, overly complicated, and probably a pain to program in. That said, I know it's also hypothetically one of the best game programming languages. Is there a good guide to get you up to speed on C++ (all the different types of constructors, templates, etc.) without going into as much painful detail as The C++ Programming Language?

    Finally, my ideal language for this would be some small superset of C with OOP. It sounds like objective C is more or less that, but given the Apple is moving away from it, it seems like a less valuable language to learn. Also my OOP experience is mostly from Java and the whole "messaging" method call system strikes me as odd. How fast can a (reasonably) competent C programmer learn objective C? Are there any other languages that meet this criteria?

    Thanks.

    Edit: forgot to mention that I'm thinking purely text-based and built from scratch, so I don't care about the availability of game engines/graphics libraries. That said I would like to try building out some fairly complicated RPG features so

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

    In your opinion, what sorts of projects are better done with a paid development team, and what sorts of projects are better open sourced?

    Posted: 01 Jul 2018 04:29 PM PDT

    Is anybody else working on the last slice challenge?

    Posted: 01 Jul 2018 09:39 PM PDT

    I'm stuck on challenge 2 and was curious if anybody else wanted to collaborate to try and find the solution.

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

    I'm looking to create my first app in Java. Need guidance.

    Posted: 01 Jul 2018 05:08 PM PDT

    I want to create a simple audio playing app for sound effects in Java. I plan to keep building on it and make it into a soundboard app.

    Note: I only heard from a friend to use Java because it would be more portable between different OS, if you have any other suggestions then I'm down for it too

    The thing is I've never created anything outside my class before, so I don't know where to start. What frameworks do I use? Should I use Visual Studio? or should I make it in Bash on Ubuntu on Windows with VIM. I just don't know the process on building an actual app and what people actually do in the industry.

    Any help would be appreciated

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

    Trusting oneself in the face of pushback

    Posted: 01 Jul 2018 09:56 AM PDT

    I have a habit of being somewhat indecisive and careful when I first join a team. I usually don't want to make waves, and try to first understand the team's processes before proposing to change things. However, many times what ends up happening is I notice what's wrong, but don't push enough to change them. I got shot down by teammates or superiors and don't put up too much of a fight, and then at some point I just accept and maintain the status quo and end up forgetting what it was I wanted to change in the first place.

    It's not like my ideas are crap, many times I've seen them implemented later by someone else or myself sometime later, and I feel like a total jack-ass for having trusted others over trusting myself. Has anyone else gone through a challenge like this? I'd really love to be able to better keep a "beginner's mind" at work, trust myself more, and just maintain a better sense of integrity, especially in the face of push back.

    Just looking for some strategies and ideas, maybe books you've read that help with this.

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

    C++ Decimal to Binary using stack

    Posted: 01 Jul 2018 04:38 PM PDT

    I keep getting 1's repeating as a conversion for any number i put in. Additionally i'm not allowed to alter "stack.h" and "stack.cpp" in any way. Please help.

    /------------------------------------StackDriver.cpp---------------------------------*/

    #include <iostream>

    using namespace std;

    #include "Stack.h" // our own -- <stack> for STL version

    int main()

    {

    unsigned number, // the number to be converted remainder; // remainder when number is divided by 2 Stack stackOfRemainders; // stack of remainders char response; // user response do { cout << "Enter positive integer to convert: "; cin >> number; while (number != 0) { remainder = number &#37; 2; stackOfRemainders.push(remainder); number = number / 2; } cout << "Base-two representation: "; while (!stackOfRemainders.empty()) { cout << remainder; stackOfRemainders.pop(); } cout << endl; cout << "\\nMore (Y or N)? "; cin >> response; } while (response == 'Y' || response == 'y'); 

    }

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

    /-------------------------stack.cpp------------------------------*/

    #include "Stack.h"

    #include <iostream>

    using namespace std;

    //---------Definition of Stack constructor---------------

    Stack::Stack()

    {

    //Default Constructor myTop = -1; 

    }

    //---------Definition of empty()-------------------------

    bool Stack::empty() const

    {

    return (myTop == -1); 

    }

    //---------Definition of push()--------------------------

    void Stack::push(const StackElement & value)

    {

    if (myTop < STACK\_CAPACITY - 1) { \++myTop; myArray\[myTop\] = value; } else { cerr << "\*\*\* Stack full -- can't add new value Must increase value of STACK\_CAPACITY in Stack.h \*\*\*\\n"; exit(1); } 

    }

    //---------Definition of pop()--------------------------

    StackElement Stack::pop()

    {

    StackElement value; if (!empty()) { value = myArray\[myTop\]; myTop--; } else { cerr << "\*\*\* Stack is empty --can't remove a value \*\*\*\\n"; exit(1); } return value; 

    }

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

    /*--------------------------------------Stack.h------------------------------------------

    This header file defines a stack data type.

    Basic operations:

    constructor: Costructs an empty stack

    empty: Check if the stack is empty

    push: Modifies a stack by adding a value at the top

    pop: Remove an element from top of the stack

    */

    #ifndef STACK_H

    #define STACK_H

    using namespace std;

    const int STACK_CAPACITY = 20;

    typedef int StackElement;

    class Stack

    {

    private:

    /\*\*\*\*\*\*\* Data Memebrs \*\*\*\*\*\*\*\*\*\*\*\*\*\*/ StackElement myArray\[STACK\_CAPACITY\]; int myTop; 

    public:

    /\*\*\*\*\*\*\* Function Memebrs \*\*\*\*\*\*\*\*\*\*\*\*\*\*/ Stack(); //Constructor - An empty stack has been constructed. bool empty() const; //Check if the stack is empty. void push(const StackElement & value); //Adds an element to a stack. StackElement pop(); //Remove an element from top of the stack 

    };

    No comments:

    Post a Comment