• Breaking News

    Monday, January 11, 2021

    Is project based learning more effective than taking notes?? learn programming

    Is project based learning more effective than taking notes?? learn programming


    Is project based learning more effective than taking notes??

    Posted: 10 Jan 2021 05:00 AM PST

    I take notes as a simple reference to look back on, but I've recently just been too lathargec and tired to write anything down. I do remember what I've been learning (kind of) and I put that into projects to solidify my knowledge I'm just worried that maybe taking notes is a good way to structure knowledge since I can actually physically see my diagrams and text instead of having to visualize it in my mind. I feel as though I could visualize in my mind easier if I draw the diagram down and reference it

    (I understand that just straight visualizing would strengthen my brain, but what if I got some information wrong?? I'd have to to go searching on Google for the right awnser).

    Just wanted other people thoughts on the matter. Lmk if completly ditching note taking has worked for you.

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

    What learnings took you to the next level?

    Posted: 10 Jan 2021 04:08 PM PST

    I realised with learning anything, especially CS, growth isn't always linear. There are one or two concepts that sometimes exponential increases growth. For me one of these things was intuitively understanding recursion.

    What was it for you that took you to the next level?

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

    What type of person do you recommend be a programmer?

    Posted: 10 Jan 2021 09:32 PM PST

    I start Harvard's CS50 online course tomorrow, and want to dedicate my full time to it so I can begin to transition to programming. It's currently free but you can pay $200 to receive a certificate of completion (thought it would be good to add to a resume and after completion I would begin a coding boot camp). My problem is I don't want to dedicate months of my time and then realize that I don't enjoy it at all. What are some things about learning coding that most people don't realize (if there is any) and pros/cons to being a programmer?

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

    How do you keep track of long pieces of code?

    Posted: 10 Jan 2021 05:03 PM PST

    I'm working on my first major project, and my primary script is growing to the hundreds of lines

    How do experienced programmers keep track of what happens where? Currently I have a diagram that I drew on paper, but it is hard to redraw it each time I refactor the code or add a new section.

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

    Here because of Angela Yu

    Posted: 10 Jan 2021 11:42 PM PST

    I'm a person who wants to learn programming etc. as part of the 2020 web development bootcamp, would anybody like to be my peer, I'm a beginner so don't expect me to be a mentor but just learning together would be fun. Who wants to be a peer? also if you're experienced at this you can become a mentor too.

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

    Running a Program 24/7 Not on my PC

    Posted: 10 Jan 2021 11:03 PM PST

    Hi, I want to run an .exe file 24/7 not on my PC, since my current PC and WiFi aren't stable. Is this something that can be done? I have heard of VMs and services such as AWS. What's the process like to get it set up?

    I wouldn't mind paying a price if it's a cheap option. I know some of these services have free services up to x hours as well. Is it viable to just sign up a new account before the trial ends? Could someone shed some light on what my best option would be in this case? I don't know anything about Linux or programming in general.

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

    Whats some good general tips for good responsive web design?

    Posted: 10 Jan 2021 10:26 PM PST

    Whats some good advice you'd like to share about responsive web design? Thank you.

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

    Where do comparison sites get their data from?

    Posted: 10 Jan 2021 04:34 AM PST

    Sites like dpreview or gsmarena - they have RIDICULOUS amount of data of each devices specs. Where does it all come from? Does each retailer open their API for them? Manual data entry? Where does it come from?

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

    Is there any good resource/repository of design patterns in real world apps?

    Posted: 10 Jan 2021 09:04 PM PST

    Books like Head first Design patterns are good. But I feel that in real applications using JEE, spring etc. At least for me it's quite difficult to come up with a pattern application. It would be great to have examples of these patterns in enterprise applications.

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

    Help with basics.

    Posted: 11 Jan 2021 12:39 AM PST

    I really wish i could post pictures so this problem could be resolved vry fast considering its very basic. I just started my journey completely blind into the world of programming. I am currently following this book online to get me started with the basics of python and using mu to create lines of code. http://automatetheboringstuff.com/ I am very determined and i want to learn. The only problem i have is that the book suggests i run a certain line of code that always ends up giving me syntax error with the same " missing whitespace before operator" message when i check what's wrong. I seriously cant even figure out what to do bc Ive looked it up and it tells me to put spaces between certain characters and it still doesn't work. PLease help me i await your friendly response so i may start again shortly.

    >>> print('Hello, world!') i am asked to copy this code but ive tried so many ways to only fail again and again.

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

    Why do we need both Abstraction and Encapsulation? OOP

    Posted: 10 Jan 2021 03:49 PM PST

    This is going to sound really stupid, I'm sorry but I'm still new.

    Okay so here me out, I understand that if cars have seat belts why would they need air bags and if they have air bags why would they need seat belts. Obviously it's to keep the passengers and driver safe, we do want them to die. But why do we need both abstraction and Encapsulation? Wouldn't Encapsulation on its own keep information from spreading to unwanted areas of the program? Or vise versa with abstraction? I understand they both have to do with hiding and security with slight functionality difference. But why do we have both and do you have to incorporate them both or can you chose.

    Again I'm sorry if there dumb questions.

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

    diagonal win check?

    Posted: 11 Jan 2021 12:29 AM PST

    i dont know if this is the right place to ask, but ive been coding connect 4 in vb.net, and i cant for the life of me get the diagonal win checks to work. any help would be massively appreciated

    Module Module1 Dim board(6, 7) As String Sub Main() For i As Integer = 1 To 6 For j As Integer = 1 To 7 board(i, j) = " - " Next Next Console.WriteLine("Hello, welcome to naughts and crosses" & vbCrLf & "Enter the name of player 1: ") Dim name1 As String = Console.ReadLine() Console.WriteLine("And now player 2: ") Dim name2 As String = Console.ReadLine() Console.WriteLine("Do you want to..." & vbCrLf & "1. Play" & vbCrLf & "2. Load a Win" & vbCrLf & "3. Save a Win") Dim choice As Integer = Console.ReadLine() Select Case choice Case 1 playgame(name1, name2) Case 2 loadgame() Case 3 savegame() End Select End Sub Sub playgame(name1, name2) Console.WriteLine("your in the playgame sub" & vbCrLf & "First you need to pick your symbols, " & name1) Dim p1sym As String = picksymbols() Console.WriteLine("Now its " & name2 & "'s turn,") Dim p2sym As String = picksymbols() Console.WriteLine(name1 & "'s symbol is " & p1sym & " & " & name2 & "'s symbol is " & p2sym) If p1sym = p2sym Then Console.WriteLine("Your chosen symbols cannot be the same, please enter them again.") playgame(name1, name2) End If updategamegrid() Dim count As Integer = 0 Dim win As Boolean = False Do Until win = True If count = 42 Then Console.WriteLine("Game over, its a draw" & vbCrLf) Main() End If placeCounter(p1sym, name1) count += 1 updategamegrid() placeCounter(p2sym, name2) count += 1 updategamegrid() Loop End Sub Sub loadgame() Console.WriteLine("your in the loadgame sub") Console.WriteLine("enter the name of the saved file: ") Dim filename12 As String = Console.ReadLine() Dim filename As String = "C:\Users\willi\Downloads\codesaves\" & filename12 & ".txt" Dim file As System.IO.StreamWriter For j As Integer = 1 To 7 Console.Write(board(1, j)) Console.Write(board(2, j)) Console.Write(board(3, j)) Console.Write(board(4, j)) Console.Write(board(5, j)) Console.Write(board(6, j)) Console.WriteLine() Next Console.ReadLine() End Sub Sub savegame() Console.WriteLine("your in the savegame sub") Console.WriteLine("Enter the file name that you want to store the gamesave as") Dim filename12 As String = Console.ReadLine() Dim filename As String = "C:\Users\willi\Downloads\codesaves\" & filename12 & ".txt" Dim file As System.IO.StreamWriter file = My.Computer.FileSystem.OpenTextFileWriter(filename, False) For j = 0 To 6 file.WriteLine(board(j, 1)) file.WriteLine(board(j, 2)) file.WriteLine(board(j, 3)) file.WriteLine(board(j, 4)) file.WriteLine(board(j, 5)) file.WriteLine(board(j, 6)) Next file.Close() Console.WriteLine("File Saved") Main() End Sub Function picksymbols() start: Console.WriteLine("Please enter your desired symbol: ") Dim symbol As String = Console.ReadLine().ToUpper If symbol.Length > 1 Then Console.WriteLine("Your symbol can only be one character, please choose again.") GoTo start End If Return symbol End Function Sub updategamegrid() Console.WriteLine(vbCrLf & " 1 2 3 4 5 6 7") For i As Integer = 1 To 6 For j As Integer = 1 To 7 Console.Write(board(i, j)) Next Console.WriteLine() Next End Sub Sub placeCounter(symbol, name) start: Console.WriteLine("Enter desired column number: ") 'row numbers: 1 = top, 6 = bottom Dim pos As Integer = Console.ReadLine() If pos > 7 Or pos < 1 Then Console.WriteLine("invalid position, please enter again") GoTo start End If Dim row As Integer = 0 Dim done1 As Boolean = False Do Until done1 = True If board(6 - row, pos) = " - " Then 'move is valid board(6 - row, pos) = " " & symbol & " " Dim cords As String = 6 - row & pos checkforwin(cords, symbol, name, pos) If checkforwin(cords, symbol, name, pos) = True Then Main() End If Exit Sub Else 'character already there row += 1 If row = 8 Then Console.WriteLine("Invalid move, please try again") End If End If Loop End Sub Function checkforwin(lastpiece, symbol, name, pos) Dim x As String = lastpiece(1) Dim y As String = lastpiece(0) Dim counter As Integer = 1 If x <= 3 Then For i As Integer = 0 To 2 If board(y, pos + i) = board(y, pos + i + 1) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next ElseIf x >= 5 Then For i As Integer = 0 To 2 If board(y, pos - i) = board(y, pos - i - 1) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next ElseIf x = 4 Then If x <= 3 Then For i As Integer = 0 To 2 If board(y, pos + i) = board(y, pos + i + 1) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next End If If x <= 3 Then For i As Integer = 0 To 2 If board(y, pos - i) = board(y, pos - i - 1) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next End If End If 'checking horizontally If y <= 3 Then 'only check down the grid For i As Integer = 0 To 2 If board(y + i, pos) = board(y + i + 1, pos) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next ElseIf y >= 4 Then 'check up the grid For i As Integer = 0 To 2 If board(y - i, pos) = board(y - i - 1, pos) Then counter += 1 If counter = 4 Then Console.WriteLine(name & " wins!") Return True End If Else counter = 0 End If Next End If 'checking vertically For i As Integer = 3 To 6 For k As Integer = 1 To 4 If board(i, k) = symbol And board(i + 1, k - 1) = symbol And board(i + 2, k - 2) = symbol And board(i + 3, k - 3) = symbol Then Console.WriteLine(name & " wins!") Return True 'DIAGONAL WIN CHECK (/) End If Next Next For i As Integer = 1 To 4 For k As Integer = 1 To 4 If board(i, k) = symbol And board(i + 1, k + 1) = symbol And board(i + 2, k + 2) = symbol And board(i + 3, k + 3) = symbol Then Console.WriteLine(name & " wins!") Return True 'DIAGONAL WIN CHECK (\) End If Next Next End Function End Module 
    submitted by /u/Jedbeverage
    [link] [comments]

    How can it be possible to pass arguments to inner function inside another one with same name in JS?

    Posted: 11 Jan 2021 12:26 AM PST

    I'm new to JavaScript and learning it from Freecodecamp. here is one of script while learning higher order arrow function.

    I can't understand it completely, is there two function with same name here? where do the argument passed in? inside inner function or outer one?

    if the answer is outer function, how could it be possible as the outer function seems like don't take any argument.

    Here is the Code :

    const increment = (function(){

    return function increment(number, value){

    return number + value;

    };

    })();

    console.log(increment(5,2));

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

    I want my program to automatically download a file in c#

    Posted: 11 Jan 2021 12:23 AM PST

    I am making a windows forms app. I want to show it to my friend and I want my program to automatically download a sound file when it downloads the exe. How can I do it.

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

    C using arrow keys .

    Posted: 10 Jan 2021 06:06 PM PST

    How to use arrows keys without conio.h (getch()) ?

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

    Finding locations for businesses?

    Posted: 10 Jan 2021 11:28 PM PST

    I'm trying to write a program to take a csv of companies and their website urls, and categorize them by city/state of their headquarters. however, I'm not sure how to get started. is there a library or maybe a web-crawling technique I could use to gather geographic information? I'm planning to write it in haskell, but I'm also familiar with c++ and python, in case that's relevant.

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

    [opencv][ICP]how to use the transform matrix to register a 3D point cloud with Iterative closest point based off the opencv

    Posted: 10 Jan 2021 05:24 PM PST

    Hi,

    https://docs.opencv.org/4.3.0/dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html

    I dig in the function

    registerModelToScene() [1/2] 

    To my understanding, it will calculate a Transformation between srcPC and dstPC.

    but how do i use this Transformation to combine these two point cloud or register a final one?

    also, what is the the normals (Nx6)?

    my goal is to use a bunch of point clouds from different angle for one object to register one 3D integral object. I will highly appreciate it if you could give more hints like some pseudo code to implement with at least this opencv method!

    thanks a ton!

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

    Managing a codebase is getting tiring more than coding itself

    Posted: 10 Jan 2021 06:36 AM PST

    I know this may sound like a rant but its really not.

    The more my codebase gets bigger, the more making the code clean and managing it not to turn into a spaghetti dish seems like the most time consuming thing I do.
    Like when I go and code a function I want in my game, it takes time for sure but it has this feeling of accomplish and its fun to add new things and make it work, but after a bit of functionality addition comes the horror of making the code "Clean and extendable", maybe I am a perfectionist? not sure, but this managing takes a lot more time than coding the game functionality itself, its also boring and
    feel like a chore every now and then.

    So how do you go on about that? I'm not an expert or anything but to be honest really overwhelmed with how much my codebase size is getting up to week by week. Also I'm the only programmer in the project.

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

    How to edit this code so that I can view only texts?

    Posted: 10 Jan 2021 11:08 PM PST

    This is a snippet of config file of snownews (a terminal based news aggregator).

    Problem : When I try to view a rss feed on terminal, I can only view text till the image! after that everything is blank. Also since i'm using a terminal image is also not supported.

    img :https://imgur.com/a/O3Gq2Dl

    Here is the code were the web scraping takes place. I only need to view text without any images,

    ####################################################################### # Importing if (($PROGRAM_NAME =~ "snow2opml") || ($ARGV[0] eq "--export")) { OPMLexport(); } else { my $parser = XML::LibXML->new(); $parser->validation(0); # Turn off validation from libxml $parser->recover(1); # And ignore any errors while parsi> my(@lines) = <>; my($input) = join ("\n", @lines); my($doc) = $parser->parse_string($input); my($root) = $doc->documentElement(); # Parsing the document tree using xpath my(@items) = $root->findnodes("//outline"); foreach (@items) { my(@attrs) = $_->attributes(); foreach (@attrs) { # Only print attribute xmlUrl="" if ($_->nodeName =~ /xmlUrl/i) { print $_->value."\n"; } } } } ####################################################################### 

    Since I'm a noob in programming some help is needed. If full code is needed I can post...

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

    Question about PHP/Backend/ASP.NET

    Posted: 10 Jan 2021 04:40 PM PST

    I know how to use HTML, CSS and JS but i never used PHP, but i have a question about how it works.

    So if im not wrong PHP is code that runs in the server, the client never sees it right? My question is the following one (sorry if this is stupid or something)

    Does PHP run every time someone refreshes the page? or is it global?

    Im asking this because im seeing a lot of people recomending PHP in other post like this, but i dont know if i should learn it. I love to learn new things but i dont know if it will be useful for my project.

    So if im not wrong ASP.NET is like PHP right? I really like C# so id prefer learning that if its posible.

    I want my website to communicate with TCP with another C# application that i have, the problem is that i dont want to do that for each client in the web, only one time in the server and then forward that information to the users (without reloading the page, i dont know if thats posible)

    As i said, sorry if this is a stupid question, but i want to learn backend and i dont know if i should learn PHP or something else, and sorry for my awful english.

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

    Best tasks for a new Jr. Software Engineer Hire

    Posted: 10 Jan 2021 04:39 PM PST

    I'm stepping into my first role as a supervisor and we are hiring on a new junior engineer. In your experience, what are some of the best tasks to assign said engineer in order to get them acquainted with your company's systems, programming languages, etc? Any advice is welcome, both from a manager/supervisors perspective as well as a junior engineers perspective.

    Things I've had done for me in the past which I believed helped were:

    1. Given several weeks to immerse myself in the system

    2. Pair programming with a more experienced developer

    3. Trivial tasks

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

    Is what they teach you in college enough?

    Posted: 10 Jan 2021 03:51 PM PST

    I'm a first year CS major and am feeling kind of lost. Right now, I'm just learning basic programming concepts like loops, conditionals, OOP, and DSA but I don't feel like I can develop anything with them.

    I want to apply to internships, but feel like I am incompetent. Do you think I can start applying with what I know now or is there anything else I need to learn. Also, how do I learn to develop things. I would love to hear your recommendations or any experiences you may have had.

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

    Looking for some books to read as a college sophomore in CS.

    Posted: 10 Jan 2021 05:52 PM PST

    I've already read Coders and CTCI, but would like to read more books that are helpful for beginner coders to really understand concepts in Computer Science. Any recommendations are appreciated. Thank you!

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

    Confused about choosing between Golang and Lua

    Posted: 10 Jan 2021 09:36 PM PST

    I'm a pretty novice at programming but I know a bit about C and Bash. I occasionally use it to make small scripts to make my workaround Linux a bit easier. Currently, I'm looking forward to learning a new language but I'm pretty confused between Lua and Golang.

    I'm mainly focusing on Lua because I've been using AwesomeWM which is completely Lua based and to make changes one has to know a bit of Lua. But Golang seems to be pretty impressive to me but there aren't much of Windows Manager (WM) based on it nor there is any active development of any such WM. Mainly I love AwesomeWM because it lets you create widgets and completely make things from scratch unlike other WMs like i3 or bspwm.

    The main reason I want to choose a WM based on the language is that it would enable me to implement my knowledge directly into configuring it. So what are your suggestions? Is it worth learning Lua? I'm kind of sceptical about it since it seems almost a dying language with more and more people going away from it.

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

    No comments:

    Post a Comment