• Breaking News

    Monday, May 10, 2021

    Git Cheat Sheet learn programming

    Git Cheat Sheet learn programming


    Git Cheat Sheet

    Posted: 09 May 2021 09:52 AM PDT

    Is there a book about "big picture stuff"? I wanna know how all the pieces fit together and need help.

    Posted: 09 May 2021 06:56 PM PDT

    This might be a frequent occurrence, a new guy trying to learn and has no idea where to start... A friend of mine that already works with programming is helping me start in this journey and I kind of already know what I'm gonna study, at least what language and whatnot, what I don't really know is how does it all fit together.

    He talks about so many different things and how the programming world works, and I feel completly lost. Stuff like: What is an IDE, what it is used for, and repositories, client side and server side...

    I wanna know, at least on a basic level, how does this industry work and why are things done this way... How does a modern program works, generally? What a modern stack consists of?

    I know that if I look all these topics individually I might be able to know what each of them are, but I wanna know, as I've said already, how they all fit together.

    Is there such a book?

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

    Path from self-taught to employment?

    Posted: 09 May 2021 08:36 AM PDT

    I'm interested in learning programming and changing career paths. I'm not interested in getting another degree, I already have two and I'm approaching 40.

    Is it feasible to teach myself and land a gig with no formal degree, and with my age?

    If so, what would be the best path do go down with those two stipulations in mind (self taught, age)? For example would it be easier to find work as a web dev and learn html, etc, or should I choose another language like arduino or python that enables a different career path?

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

    Questions regarding front end development and databases...

    Posted: 09 May 2021 10:28 PM PDT

    Hello guys, I'm currently learning front end dev for a few months now. Now comfortable with vanillaJS, jQuery and React. Quite confused with the next steps to take. Questions are:

    1. Are all databases like JSON files? I've been creating projects that are using APIs as backends. I've noticed that you usually go to a link that has a JSON file which contains the data that you need. Are all databases like that? I'm not sure if this question makes sense but when you try to access data using your front end, is it similar like how you'd get stuff from an API? (This kinda leads to the next question)
    2. Should a front end developer know NodeJS, Express and MongoDB? In relation to the first question, since I can say I'm comfortable now with API requests, I'm scared that I might face a different way of fetching data? (again not sure if this is making any sense). I've read that learning those three is a full-stack developer's job but I don't want to be expert on that. I just like front end development. But if it's really a need, I'll surely do it.

    Thanks in advance.

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

    Is it better to learn a harder language first?

    Posted: 09 May 2021 11:23 AM PDT

    I am learning JavaScript now but I feel like C++ or Java for example would have been better as a first language. This is because I am not sure if web development is for me and I feel like a transition from these harder languages to JavaScript is easier than vice versa

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

    How can I serve multiple websites in apache2?

    Posted: 09 May 2021 09:47 PM PDT

    Hi, I am a newbie to server configurations. I have apache2 with multiple WordPress websites I would like to serve from one server. However, I am confused about the Server Name configuration in .conf file(Virtual host). For one of the websites, I set the configurations like below.

    VirtualHost *:80> ServerAdmin admin@example.com ServerName hello.com ServerAlias www.hello.com DocumentRoot /var/www/wordpress <Directory /var/www/wordpress> AllowOverride All </Directory> </VirtualHost> 

    From the browser, I tried connecting to hello.com, and it redirects me to another website online (I may sound stupid about this since it's obvious). I am confused since shouldn't ServerName redirect me to my website? Is that ServerName only valid once I buy that domain name?

    Based on these, How can I set the configuration right to serve multiple websites from one server?(I am aware that I should create another and changing the Directory but I want to access my different websites just by using the local domain name or directory name). Thanks!

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

    Can I create decent websites by just knowing HTML and Javascript? Thanks

    Posted: 09 May 2021 11:23 PM PDT

    I already know python fairly well. Ive taken several online courses and took a seated course in college. Im looking to build basic websites, is CSS necessary ?

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

    Java as a Freelance developpers

    Posted: 09 May 2021 11:16 PM PDT

    Hi, i would like to have some feedback about this subject.

    I know what a web developper can do to make money but it is not as clear for me for a java dev.

    Your job is to make software for your client ? But while making a full functionning website can be achieved by one person, it is to me more restricted for a freelance software dev.

    I believe it would be small helpfull programs for small companies to ease certain tasks.

    Can some one with little experience can make it his job ? I have a base level in Java and i am concidering boosting it up to monetize this skill.

    But i m also thinking a web dev formation would be a better choice but somewhat harder because last time i did some it was a long time ago...

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

    Not sure how actually use polymorphism in this case

    Posted: 09 May 2021 11:11 PM PDT

    I have an assignment where I need to implement a couple of classes in C++ for a hypothetical networking protocol. I've named the classes Packet and Payload. Payload inherits from Packet, and both have virtual send and receive methods (the assignment specified that these two methods must be virtual).

    To give an example of what I am having trouble with, Packet has a virtual send function that returns a string containing the data that needs to be sent; Payload (the class that inherits from Packet) also has a send function. The Packet class has its own set of member variables (sender id, receiver id, etc.) including a payload. The Payload subclass defines a specific type of payload. However, in addition to forming the return string, the Payload subclass needs to send a message (i.e., I think that in addition to the payload the return string needs to include the member variables that Packet has, like sender id).

    Is there a proper, elegant OOP way to do this? Or do I just need to have a constructor for Payload that takes in all of the arguments of the parent class in addition to its new members? Is there a way to have a specific object instance of a subclass be associated with a parent object? Or should I just add setter methods (this was my first idea but from the problem description I got the impression that that might not be what they wanted).

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

    Coding Groups

    Posted: 09 May 2021 09:39 AM PDT

    Hello,

    I am new to PYTHON and want to work in groups to practice ona daily basis. We can have zoom calls or any other app to work it out like a workshop. If anyone is interested drop a message. I am from India, timezone GMT + 5:30. Starting Tuesday 11/05

    submitted by /u/21bigbear
    [link] [comments]

    Tips on How to Increase Productivity After Dealing With Depression

    Posted: 09 May 2021 10:58 PM PDT

    The past year has been very difficult for me (and likely most of you reading this for obvious reasons). I lost about 4 family members and 2 friends to the pandemic, the most recent one being my aunt around three weeks ago. These losses in such close conjunction to each other led me to spiral into a depressive episode that lasted for almost the past 12 months. It has impaired a lot of my ability to be productive when not working, and even when I am working I am not at 100% when it comes to efficiency despite WFH.

    I am now sort of starting to feel like myself, and I want to get back on the horse and accomplish some of the goals I set for myself before these string of tragedies. Life must go on, as they say.

    In June of 2020, I joined a coding bootcamp which I have yet to finish for the reasons stated above. The course is self guided but my access to the tutors/mentors ends in two days and I still have barely made progress on this end as I found it very difficult to focus and as time went on, I started to associate a lot of anxiety with the course because I felt bad about not doing more, this creating a feedback loop of procrastination.

    I plan on paying for an extension to the course in order to finish it but I want to make absolutely sure that I do. Do any of you have tips on how I can maximize my time, decrease procrastination related anxiety and be more efficient in my studies?

    Any help is greatly appreciated!

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

    So I wrote a small random password generator program. Anything I should work on improving?

    Posted: 09 May 2021 05:38 PM PDT

    using System; namespace Random_Password_Generator { class Program { static void Main(string[] args) { int passwordLength; Console.Write("How many characters would you like in your password: "); try { passwordLength = Convert.ToInt32(Console.ReadLine()); } catch (System.FormatException) { Console.Write("Please enter a POSITIVE INTEGER: "); passwordLength = Convert.ToInt32(Console.ReadLine()); } Console.WriteLine($"Your password is {RandomPassword(passwordLength)}"); Console.ReadLine(); } private static string RandomPassword(int passwordLength) { Random rnd = new Random(); string possibleCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()"; char[] possibleCharactersArray = possibleCharacters.ToCharArray(); char[] passwordArray = new char[passwordLength]; for (int i = 0; i < passwordLength; i++) { int randomNumber = rnd.Next(0, possibleCharacters.Length); passwordArray[i] = possibleCharactersArray[randomNumber]; } string password = string.Concat(passwordArray); return password; } } } 
    submitted by /u/jaysuchak33
    [link] [comments]

    Difficulty level of swift and iOS development

    Posted: 09 May 2021 09:59 PM PDT

    I am currently looking to explore application development and have decided to try my hand at swift. I have coding experience in C, C++ and Python. Was wondering how hard is it to learn swift and what were some of the struggles everyone faced?

    Also if you do have any particular resources I would appreciate it! Currently thinking of using the textbooks published by Apple.

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

    Would my portfolio be good enough to start applying for jobs?

    Posted: 09 May 2021 04:31 PM PDT

    I want to start applying for jobs and would love some reviews on my portfolio

    here is a link to the site

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

    What is your must have software / setup on you Macbook for programming / development?

    Posted: 09 May 2021 06:14 AM PDT

    What is your must have software / setup on you Macbook for programming / development?

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

    Help me find the said error here pls

    Posted: 09 May 2021 11:58 PM PDT

    So I have this code, it doesn't have any errors in the code you know where on the side there will be this red exclamation mark. My code doesn't have that but when I run my code and clicked a button, it keeps showing this error, but my code still keeps running perfectly.

    I tried to find this error on this error on line 66 but there's nothing there just a closing bracket and it doesn't have any equals sign I'm really confused.

    java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 66.

    I also tried finding the equals sign I used by ctrl f and tried to find if I have any errors in using the equals sign but there's none.

    java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 66. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) at librarysystem.Search_Borrow.borrowBTNActionPerformed(Search_Borrow.java:940) at librarysystem.Search_Borrow.access$1200(Search_Borrow.java:19) at librarysystem.Search_Borrow$14.actionPerformed(Search_Borrow.java:493) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered "=" at line 1, column 66. at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) ... 40 more 
    submitted by /u/ten_Chan
    [link] [comments]

    Don't Live with Broken Windows

    Posted: 09 May 2021 11:53 PM PDT

    Hunt And Thomas on their book "The Pragmatic Programmer" concentrates on a very important aspect on code quality .

    Let's say one broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment—a sense that the powers that be don't care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner's desire to fix it, and the sense of abandonment becomes reality. The "Broken Window Theory" has inspired police departments in New York and other major cities to crack down on the small stuff in order to keep out the big stuff. It works: keeping on top of broken windows, graffiti, and other small infractions has reduced the serious crime level .

    Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation. We've seen clean, functional systems deteriorate pretty quickly once windows start breaking. There are other factors that can contribute to software rot, and we'll touch on some of them elsewhere, but neglect accelerates the rot faster than any other factor. You may be thinking that no one has the time to go around cleaning up all the broken glass of a project. If you continue to think like that, then you'd better plan on getting a dumpster, or moving to another neighborhood. Don't let entropy win.

    submitted by /u/Muhamed-Tawfik
    [link] [comments]

    What kind of graphs/ADT is useful for this?

    Posted: 09 May 2021 11:47 PM PDT

    Im doing a big project for class where you have to link themes, personalities, characteristics and decisions to characters. I'm using networkx (python) and was wondering what kind of adt and types are graph are useful here?

    What i've come up with so far so u know i'm not being lazy:

    1. Nodes are character/themes/stuff i listed above
    2. Each node in networkx can be its own graph. So I could store something in there.
    3. Maybe use a XML file for fast searching/extracting links between characters or just a full bio on a character. Though im not sure if just using a graph functions is faster.

    What Im most concerned with. How can i show some kind of chronological order in the key decisions made in the book, For example in the book somebody decidies to marry someone and this becomes the reason they die later. This could be confusing in a graph where there is no order. Also personalities/traits change.

    Could tell me wat to look into if its alot to explain

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

    How do I teach programming? (to my little sister, 10th grade)

    Posted: 09 May 2021 02:50 PM PDT

    My sister is starting 10th grade next year, and I want to give a better head start than I had. I'm a (female) programmer who is graduating with a CS degree like this month. I've sort of been teaching her the basics in Python like variables and if statements and we just started loops and strings, as well as basic Unix commands and a bit of Git. She says she is really enjoying it and is excited when I have time to put in some hours with her. However I don't really have a roadmap, I've just been shooting from the hip with what I teach her.

    Does anyone have any resources, advice, suggestions, etc. for what I can use to help her, or common pitfalls beginners have? It's been about five years since I've been a beginner myself so it's getting harder for me to recall what insights helped, what I particularly struggled with, how fast I progressed, stuff like that.

    I'm looking for a perspective from both experienced programmers and beginners which is why I'm posting in this sub.

    Resources I've been using for anyone curious:

    • Linux commands we went over: cat, echo, vim, ls, cd, mkdir, touch
    • Project Rosalind (I'm holding her hand through Python Village)
    • Project Euler (we haven't started, but will in the future)
    • Using PyCharm
    • Oh My ZSHELL for easy zshell install
    • Oh My Git - Time Traveling game to learn git (we did the first section of tasks)
    submitted by /u/kirkatia98
    [link] [comments]

    Learning Object Oriented Programming with Practical Examples

    Posted: 09 May 2021 03:56 PM PDT

    I have been doing PHP as a hobby for a while now and have tried to get a better handle on OO, but can't seem to really get my head around it. I know PHP is not a "good" OO language and I am planning on studying Python to do that. My problem (and question) is two fold. First, all of the OO education I have come across is very impractical. While OO is meant to be based in abstraction, using a vehicle with accelerate and stop isn't really a "computer" problem. I can't find simple and practical examples of OO. The second part is related to the first, in that OO seems to overly complicate things. Using the vehicle example above, do I make seperate objects for the starter, key turn, and on, or just put in all in ignition? I think the second is closely tied to the first and it doesn't really make sense to make a bunch of separate objects when a single object will work, but on the other hand, I find my objects then seem to get really big with lots of methods and properties.

    Thank you for helping me get out of the abstract polymorphic blues to concrete encapsulation. :)

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

    First time with JavaScript Classes [Code Review]

    Posted: 09 May 2021 11:15 PM PDT

    Lately, I've been learning JavaScript. Just finished with the basic of objects and classes and this is what I built: https://ivewor.github.io/jsformClass/. Not sure, if this is the best way to use the classes and objects but I have to so, I did it. Please check the page source everything is in-line because the onclick function was not working with external JS file.

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

    Algorithm question in my C++ program - integer palindromes

    Posted: 09 May 2021 05:00 PM PDT

    So 2 issues with my code- I haven't fully written this alone, instead it was with a classmate. Secondly, I haven't touched this in forever. That being said, I cannot wrap my head around my own code! How embarrassing... the reason I am refactoring it, is because the palindromes don't seem to exactly work as I expect, check out a sample output and you can see what I mean:

    ******************************************* * MENU * * 1. Initializing * * 2. isPalindrome() * * 3. using displayCommonPalindromeDigit() * * 4. Printing * * 5. Quit * ******************************************* 1 Initializng option! ************************** * Sub-Menu: Initializing * * 1. Creating * * 2. Updating * * 3. Returning * ************************** 1 Creating 1 new FractionWG object! Calling createWG() Enter num: 3444443 Enter denom: 3443 Calling FunctionWG(int, int) ! ************************** * Sub-Menu: Initializing * * 1. Creating * * 2. Updating * * 3. Returning * ************************** 3 Returning to previous menu ******************************************* * MENU * * 1. Initializing * * 2. isPalindrome() * * 3. using displayCommonPalindromeDigit() * * 4. Printing * * 5. Quit * ******************************************* 2 Palindrome Option -- The current Fraction is a Palindrome! ******************************************* * MENU * * 1. Initializing * * 2. isPalindrome() * * 3. using displayCommonPalindromeDigit() * * 4. Printing * * 5. Quit * ******************************************* 3 displayCommonPalindromeDigit() Option - There is/are 14 common digit(s) of 3 3 4 4 4 4 4 4 4 4 4 4 3 3 

    The bottom really doesn't add up! Makes no logical sense. Anyways, here is the code. I am wondering if there is any advice to fix it. I personally think it is over-engineered but this is the exact part where my partner did the work since I had no idea about this. Here is the code snippet:

    void fractionUtility::displayCommonPalindromeDigitWG(FractionWG* fwg) { int commonWG = 0; int dWG = (fwg->getDenom() > 0) ? fwg->getDenom() : -(fwg->getDenom()); int nWG = (fwg->getNum() > 0) ? fwg->getNum() : -(fwg->getNum()); while (nWG > 0) { while (dWG > 0) { if (dWG % 10 == nWG % 10) { commonWG++; } dWG /= 10; } nWG /= 10; dWG = (fwg->getDenom() > 0) ? fwg->getDenom() : -(fwg->getDenom()); } nWG = (fwg->getNum() > 0) ? fwg->getNum() : -(fwg->getNum()); std::cout << "\n There is/are " << commonWG << " common digit(s) of" << std::endl; while (nWG > 0) { while (dWG > 0) { if (nWG % 10 == dWG % 10) { std::cout << " " << nWG % 10 << "\n"; } dWG /= 10; } nWG /= 10; dWG = fwg->getDenom(); } } bool fractionUtility::isPalindromeWG(int x) { x = (x > 0) ? x : -x; int reverseWG = 0; int tempWG = x; while (tempWG > 0) { reverseWG *= 10; reverseWG += tempWG % 10; tempWG /= 10; } return x == reverseWG; } 

    Thanks! Also weird coding convention the prof's prereqs.

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

    Code.org Debugging

    Posted: 09 May 2021 06:57 PM PDT

    I need help on my code.org code, i want to make a app that tells information about a game, displaying publisher and developer of the game (will add more). but it displays the whole list of publishers and developers. if anyone could help id be very grateful. if anyone would be okay with helping dm me and we can talk about fixing it or some tips that would help.

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

    Pwd.getpwall in a function Python

    Posted: 09 May 2021 10:35 PM PDT

    Is there a way to put pwd.getpwall in a dictionary then in a function? Im trying to make a script that outputs my users, with their UID, name and shell.

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

    No comments:

    Post a Comment