[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]

/hob/ - Hobbies

Video game related hobbies go on /games/
Email
Comment
File
Embed
Password (For file deletion.)

  [Go to bottom]   [Catalog]   [Return]   [Archive]

File: 1514942759177.jpg (187.78 KB, 817x1000, 817:1000, 1511667641819.jpg) ImgOps iqdb

 No.41214[Last 50 Posts]

 No.41215

When I try to use this function I made I get the error .addEventListener

I think .addEventListener isn’t being found as a function because it is not finding the class in my html. but I added document.addEventListener(“DOMContentLoaded”, function(event) {

}); after it so the function with the addEventListener should only work after all the html is loaded. It still doesn’t work and I’m not exactly sure why. Does anyone know how I can solve this or if there is a better way to do this?


here is my javascript I will appreciate any help.

function newQuote(){
let httpRequest;
let reset = document.getElementsByClassName('reset');
reset.addEventListener('click', makeRequest);

function makeRequest(){
httpRequest = new XMLHttpRequest();

if(!httpRequest){
alert('giving up, can not create http instance');
return false;
}

httpRequest.onReadyStateChange = randomQuote;
httpRequest.open('GET', 'https://random-quote-generator.herokuapp.com/api/quotes/', true);
httpRequest.send();
}

function randomQuote(){
if(httpRequest.readyState === XMLHtttpRequest.DONE){
if(httpRequest.status === 200){
alert(http.responseText)
} else {
alert('there was a problem with the request');
}
}
}

}

document.addEventListener("DOMContentLoaded", function(event) {
newQuote();
});

 No.41217

>>41215
>let reset = document.getElementsByClassName('reset');
>reset.addEventListener('click', makeRequest);

getElementsByClassName return a nodelist object (multiple elements), so either you loop through it or choose one element like this reset[0].addEventListener('click', makeRequest);

 No.41234

I currently have a for loop with the var i increasing over the length of the array of objects. Console.logging it returns the entire array of objects, but I just want a random single value. I have got the for loop to return objects in random order, but how do I return just a single value from this? I will appreciate any help or if anyone can lead me to a similar problem on stack overflow that is answered.
here is my relevant code :

let colors = ['#16a085', '#27ae60', '#2c3e50', '#f39c12', '#e74c3c', '#9b59b6', '#FB6964', '#342224', "#472E32", "#BDBB99", "#77B1A9", "#73A857"];

let reset = document.querySelector('.reset');

reset.addEventListener('click', newQuote);

function newQuote(){
let httpRequest;

function makeRequest(){
httpRequest = new XMLHttpRequest();

if(!httpRequest){
alert('giving up, can not create http instance');
return false;
}

httpRequest.onreadystatechange = randomQuote;
httpRequest.open('GET', 'https://random-quote-generator.herokuapp.com/api/quotes/', true);
httpRequest.send();
}

function randomQuote(){
if(httpRequest.readyState === XMLHttpRequest.DONE){
if(httpRequest.status === 200){
var data = JSON.parse(this.response);
var randomresponse = data.map(quote => quote.quote);
console.log(randomresponse);
} else {
alert('there was a problem with the request');
}
}
}
makeRequest();
randomQuote();
}

document.addEventListener("DOMContentLoaded", function(event) {
newQuote();
});

 No.41241

>>41234
I fixed it. Here is what I wanted and it works

if(httpRequest.readyState === XMLHttpRequest.DONE){
if(httpRequest.status === 200){
var data = JSON.parse(this.response);
var randomresponse = data[Math.floor(Math.random() * data.length) ]
console.log(randomresponse.quote);
} else {
alert(‘there was a problem with the request’);
}
}
}

 No.41248

Just testing the code tag.
[code]
<!DOCTYPE html>
<html>
<head>
<title>Hello</title>
<meta charset="UTF-8" />
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
[/code]

 No.41484

File: 1516058332673.png (160.4 KB, 1920x1080, 16:9, 2018-01-15-181421_1920x108….png) ImgOps iqdb

I am trying to pass my array 'url' through my XMLHttprequest GET, and I'm using .forEach to do it, I want to GET the json object of each of the strings in my url array. I had to define my httpRequest outside of my makeRequest function because the console was saying httpRequest is not defined, but now my GET request isn't working, I'm just getting 'test' from makeRequest. Been trying to solve this over 10 hours now and still nothing, will greatly appreciate any help with this.

 No.41485

>>41484
nevermind I got it to work, I had to use this in my streams() function instead of httpRequest.

 No.41488

File: 1516075136949.png (264.11 KB, 1608x882, 268:147, 1428410463231.png) ImgOps iqdb


 No.41489

>>41488
What does your post have to do with this thread? Not everyone learning/doing programing is in it for a six figure job.

 No.41494

File: 1516089014169.jpg (1.32 MB, 4076x1376, 1019:344, 1511127803354.jpg) ImgOps iqdb

>>41488
>The problem withs programming is… Once you've learned the basic syntax of a language (which should take a month or two tops) there is nothing more you can really do.
that is simply false
>The problem withs carpentry is… Once you've learned how to cut wood (which should take a month or two tops) there is nothing more you can really do.
programming isn't just a syntax, it's the theoretical knowledge that you use to structure those basic parts into a more complex project

>Programming is basically the latest form of industrialization.

true, but the amazing part is that it's still possible to do it in an "artisanal" way

>computer science theory (based on electrical engineering circuitry)

computer science is based on math, and it's completely different from electrical engineering

>it's just a tool

true. it's just a very complex tool. again, programming is not about programming languages, it's the technique of deconstructing a complex problem into smaller sub-problems that can be solved with the language / api / tool

>bullshit sociology

kys

 No.41499

>>41494
>that is simply false


i'm not the guy who you reply to. there is not so much to study in programming on its own.
yes, writing safer (from memory point of view), understandable and supportable and blah blah. but what is fun in this?
anyway, if you have no idea what to do, learning programming will not give you that. you need to look somewhere else. you can learn computer science, but it is not programming.

i'm not saying you should not learn. if you do not know what to do, you need to start somewhere.

but i recall when i got my first book. i thought: now i will learn the language and will be able do anything there is possible to do. but i did not know what to do in end.

 No.41500

>>41499
Programming is a pretty broad term, it can mean, coding (expressing arbitrary commands through syntax), software engineering (the practical art of building software) and of course, computer science (a mathematical discipline).

Programming is a tool, like a pen. You can learn how to write pretty quickly, a couple coherent sentences, draw some stick figures, but that's miles away from doing something like drawing the Mona Lisa or writing a good novel.

Yes, you can learn "coding" in a few months. But can you do anything useful with that skill unless you also understand several other disciplines?
Can you build a compiler? A web server? A ray tracer?
"Coding" in itself is pretty useless unless it's used in combination with other things to solve practical problems.

 No.41547

Didn't realize there was a new thread, so I'll repost here.

I just started learning ncurses using http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html. I am not sure how this compares to other resources since this is just the first one I clicked on, but it is easy to understand and has been informative at least in the getting started phase.

I have a few ideas about what I want to do with it, but I want to understand the library better before I get into any specific project.

 No.41549

I'm taking an introduction to Programming class and the required book is Programming for Dummies.
SO I GOT a couple….. of quest-ions for you, oh great and magnificent masters…

>1.

What should I expect, and not expect?
>2.
How can I impress my instructor?
>3.
Are there any tools and soft/freeware you would recommend, or do I actually have to read the info in the links graciously provided and install Gentoo and switch to Linux….?

 No.41550

>>41549
>SO I GOT a couple….. of quest-ions for you, oh great and magnificent masters…
Why did you format that so strangely? Your ellipses even include U+2026.

>1

In terms of the general experience, it's hard to say without knowing your background, the instructor, or the target audience for the course. Some people struggle with basic programming/CS concepts, making it difficult. Some instructors are bad. Some courses are "bootcamps", while others assume you're an idiot and move at a snail's pace. If you're in an undergraduate university, then I'd assume it's the latter, though. In terms of content, read the syllabus and the table of contents in the book.
>2
Why do you want to? If you're looking for a reference for a letter of rec, then just use the same "good student" principles as in any course.
>3
What does the instructor recommend? What programming language will you be using? If it's Linux or no recommendation, then I would suggest Ubuntu 16 because it's accessible to noobs and has a huge amount of stackexchange questions/answers. You can use a VM, but I'd recommend a dual boot. If the projects involve small stuff in C or C++, then I'd use Vim. I'd be surprised if you were using C, though. Same goes for Python; for small stuff, Vim is fine. If you really want an IDE, then ipython/jupyter is nice due to its cell execution. I've also used Pycharm with its vim plugin, and that was fine. For Java I usually use IntelliJ with the vim emulator plugin (same company that makes PyCharm). Vim and jupyter are open source, Pycharm and IntelliJ have free versions.
>do I actually have to read
Yes. Read everything related to what you are doing. If you are copying code for tutorials, read that and type it in manually. If you are using a function, properly read the documentation for that function. While you are getting started with Linux, type "man <program name>" before using a program that you are not familiar with.

 No.41551

>>41550
It's a relatively large university that buys into most of the new, popular stuff that comes along… I think the latest popular meme degree is Organizational Leadership. Before that it was all Information Systems I think. Whatever. I think it'll be nice. The class doesn't count towards the CS degree, but I think it might count towards quantitative reasoning basics; so I don't think too many take the class and it might be a little more focused on each student a little more.
>Why do you want to?
Getting in good with professors can save your bacon a great deal if you find yourself in a pickle. Plus, impressing the instructor is another way of saying, "I want to do better than my best."

>What does the instructor recommend?


>>This course covers a study of the algorithmic approach in the analysis of problems and their computational solutions, we will use VBA (Visual Basic for Application) for that.

>>1. Interpret information presented in mathematical and/or statistical forms.
2. Illustrate and communicate mathematical and/or statistical information symbolically, visually and/or numerically.
3. Determine when computations are needed and execute the appropriate computations.
4. Apply an appropriate model to the problem to be solved.
5. Make inferences, evaluate assumptions, and assess limitations in estimation modeling and/or statistical analysis.

 No.41552

>>41551
>the class doesn't count towards the CS degree
In that case, it will probably be slow-paced. I guess the best indicator for how well you might do is your competence in math classes. If those are no problem for you, then the course might feel too slow.
>VBA
You will need to use Windows, then. I would recommend trying Linux on your own, though. Especially if you are in a CS/CS-related degree program.

I don't think there's much you can do to impress the instructor that is different from other classes. In the past I have done a couple of things in projects that went "above and beyond" the scope of the course because I was interested in the content, but there was never a reaction from the professors. Sit in or near the front if you can, ask questions and use office hours if you need to, be clearly attentive during class, show up a few minutes early and stay until the end. That sort of thing.

 No.41554

>>41552
>trying Linux on your own
Would you recommend a Virtual Machine Player for playing around with Ubuntu and Linux?

 No.41612

>>41554
I think a dual boot is better, but if you're not sure about committing the hard drive space to it yet, then a VM might be better. There's a linux thread in the catalog right now; it doesn't have much substance for beginners, but you could ask questions there if you need help.

 No.41632

>>41612
I just got out of my Intro to Programming class. And what I'm very VERY interested in now is knowing whether or not this is the place I should come to when I have questions about my class and other things of interest that come up along the way. And is /g/ and /v/-/agdg/ any good for general, basic programming questions?

 No.41634

>>41632
>is /g/ and /v/-/agdg/ any good for general, basic programming questions?
no. /g/ is much more about consumerism and autism than programming. you should stick to your textbook and stackoverflow. if you don't have a textbook, here is a list of recommendations

>https://stackoverflow.com/questions/22873/language-books-tutorials-for-popular-languages


and you can download them from here

>http://gen.lib.rus.ec/

>http://www.allitebooks.com/

 No.41635

>>41634
Not this wiz, but I'd like to add that /agdg/ is nothing but a bunch of attentionwhores, memes, and shitposting.

 No.41640

>>41632

4chan is terrible if you actually want to learn anything. You may learn something there on accident, though.

I remember my intro to programming class was a complete cakewalk. It was so damn easy I don't even remember what I learned. Basic shit like difference between iteration and recursion, control structures, and OOP principles.

 No.41649

>>41634
>/g/ is much more about consumerism and autism
It isn't even good at that. Most don't stay up-to-date on tech and rather then autistically look things up and argue with data and details they mostly just use obsolete generalizations and stale memes.

 No.41650

>>41635
Well, it's worth adding that there's /vm/, /ideaguy/, and an actual /agdg/ board for people who want to get very specific. It's worth noting the potential for actually starting up a team that you can not only learn from, but teach at the same time - and a lot to do with coding and programming with design and brainstorming.
It's a huge shitstorm of disorganized blithering and attention whoring, yeah. But, I see it as trying to start a clan, or a Barbarian Assault team. No one ever really wants to take the initiative and carry the responsibility of helping lead a team of random guys to actually create something that might be a wate of time, nothing, illegal, whatever. And all, but what if this would just happen's aside.

 No.41668

I am learning algorithms currently and I'm wondering if its a good idea to try to solve the problem and then look at the solution if I can't solve it, or just look at the solution and see all the parts to understand how it works?

 No.41671


 No.41672

>>41668
you can try reading the solutions and then implementing them in various programming languages (it's not a good practice although)

 No.42228

File: 1520050688559.webm (9.48 MB, 1152x720, 8:5, 2018-03-02 22-51-55.webm) ImgOps iqdb

Made an overwatch aimbot, which was a lot easier than I thought (made it in about 2 hours). In the video I am barely touching the mouse at all and was intentionally trying to miss when shooting the bots. It uses the healthbar to detect where the head is, which is why tracking is lost when the healthbar disappears or goes outside of the green rectangle.

 No.42235

>>42228
Awesome!Mind sharing?

 No.42238

>>42235

Babby's first aimbot isn't worth sharing. Overwatch detects cheats like this and makes the screen black so it no longer works. They also make the health bars darker but that is easy to bypass.

I figure the screenblock could easily be bypassed by reading directly from the framebuffer using directX, but I don't know shit about directX programming and I don't really feel like learning.

Workaround for now is to just mirror the screen using OBS's game capture, which is unaffected by the screen lock. I assume OBS is using the directx method I mentioned.

 No.42253

For the love of my life I cannot understand linked lists. No matter how much shit I read, videos I watch, and examples I look at it's just abstract nonsense to me. How useful/important are these things?

 No.42254

>>42253
what don't you understand about them, they're pretty simple, do you not know how pointers work?

 No.42255

>>42253
Do you understand pointers?
It's a pretty simple data structure, and while it's not used because of performance issues, it's important in the bigger picture.

Just imagine a bunch of cubes connected with strings.
The cube is an object/information and the "string" is a connection to the next object either in the form of a pointer or a reference (depending on the language) to the next object.
The way you traverse it, unlike a array which is accessed by an index, a linked list can only be traversed linearly one object at a time, starting either by the "head" or the "tail" (or whatever object you keep as "reference point", doesn't make much sense to keep one in the middle).

The advantage of a linked list is that you can easily add new objects at any point because the objects aren't stored in memory next to each other but in arbitrary places in memory. Adding an object in the middle of the list requires you to traverse the list until the object just before the place you want to add, change the pointer to point to the added object and set the added object to point to the next object.

Of course, this isn't very performance friendly due to how modern computers work (accessing memory is slow when it's not continuous, see "cache misses").

 No.42256

>>42253
>>42254
and to answer your question
>How useful/important are these things?
they aren't and you'll probably never use them, but if you don't understand how a linked list works you'll never understand something like a binary tree which is a very useful data structure

 No.42257

>>42254
>>42255
I understand pointers and get the concept behind what linked lists are, but seeing it implemented is just boggling to me.

 No.42258

>>42257

Are you able to understand recursion? Concepts are similar except that linked lists do not execute code, they are just a way of keeping track of memory addresses.

 No.42278

>>42258
No, and i doubt i ever will

 No.42283

>>42253
template <class t> struct node {

node<t>* next;

t* data;

};

 No.42575

what's the absolute easiest way to make a game without having to code too much? i have learned java and python coding a bit and made games systems/mechanics using interactive fiction engines, but it's always too much effort making a full fledges game experience. it's like once i work out an inventory system, or make a jrpg style chat system, or work on saving/loading, user input, it is too hard to combine everything and make a game. i just want something where all the normal shit is already done and you just gotta plug in a bunch of things and make it your own flavor, anyone know anything?

 No.42576

>>42575

UE4 was actually designed so you can do a lot of stuff without coding, using blueprints.

 No.42590

>>42575
Depending on the type of game you want to make, just pick an engine/tool that's specialized for it.
RPG maker is good for, you guessed it, RPGs.
Monogatari.IO is good for VNs.
etc.

These tools already have the most common features implemented and you can focus on making content.
The drawback is you have less control over your game, tho.

 No.42675

Forth anyone?

 No.42679

File: 1522200769507.jpg (210.45 KB, 1319x850, 1319:850, F-15_Yaw_Control-2.jpg) ImgOps iqdb

>>42590
>Depending on the type of game you want to make, just pick an engine/tool that's specialized for it.
took that advice, ended up googling for visual programming things for beginners, and i found flowlab.io, has zero typing whatsoever aside from entering values. while it's great for me now, i don't know how to use everything and the circuits you make aren't timed, as in everything fires at the same time, but some signals linger longer than others, some nodes take longer to output, some nodes need an ON output to their OFF input to stay off despite being a toggle, some values like 1 and 0 when passed through filters, even if they don't pass, will output their values, and when you are filtering for 0 and it passes 0, the 0 doesn't count as an input for some things, some things accept 0 as an on input though… many of the logic gates have a delay far greater than the speed of most other nodes so they can get choked up and stop working if the input varies too fast. despite all these confusions im making progress on my first game

tldr - you just drag and drop and connect blocks and don't gotta type or look at pages of text. why can't all suggested beginner game maker enginer include this? it reminds me more of avionics wiring diagrams like pic related, a kind of flowchart for dumb technicians to see the basics and not worry about the internals which is great for me

 No.42716

i'v thought of programing as a possible career path before but due to class scheduling issues (bad programing classes as well) and low motivation at home, i have gone months without any programing practice. i;ve got a pretty good knack when it comes to programing, but i have difficulty retaining information like certain aspect names in html and entire commands in python and c++. is ther a good website out there that can help me jog my memory in things like html and python, and that will teach me shit i will actually use when building a website or program cause all they taught me in c++ was how to do basic math in python and some what if shit that half the time didn't work

 No.43252

File: 1524158919634.png (286.92 KB, 1919x1079, 1919:1079, Capture.PNG) ImgOps iqdb

I need help wizards.

I currently need to use the computer at the library, but there is a time limit of 2 hours per user.

How would I go about increasing this time? (is it synced with windows internal clock?)

I have access to their webserver drive, C drive, task manager, CMD and system 32.

The timeclock program is called "Cybrarian" and on the webserver drive it has all the programs and administration tools, but I'm not sure what file to select for "PatronMGR.exe" to increase the time for my user. There is a file named "Patron" with my user ID in it, with the file extension of "DBA"

Screenshot provided for context.

Any help would be appreciated.

 No.43255

>>43252
Are you absolutely sure that you can't just request an extension or something?

 No.43256

>>43255
What, you think I'm some sort of normie or something?

 No.43297

>>43252
this is kinda hilarious

 No.43401

>>43256
you don't get beat up for asking

 No.44385

Can someone post the black-and-white picture that has beginner-level challenges for programming in C++?

 No.44386

File: 1531175796418.png (2.65 MB, 5288x2158, 2644:1079, Programming Challenges 4.png) ImgOps iqdb


 No.44419

What resources are out for free that I can read to learn to structure and design software?

 No.44420

>>44419
You can pirate books on the subject for free, but other than that you can check out open-source projects that use your favorite language and study them.

 No.44421

>>44420
Do you have any suggestion on books? I was thinking clean code and clean architecture would be good read
Is computer program structure and interpretation worth the read for what I am looking to learn?

 No.44423

>>44421
>Do you have any suggestion on books?

"Design Patterns" is a good general one.
Or "Head First Design Patterns" if you like the style.

>clean code and clean architecture


Seems like exactly what you're looking for.

>computer program structure and interpretation


If you mean SICP, I haven't read much of it but it's more about computer science principles than software engineering per se.
You're much more likely to get something practical out of specific books on the subject, like the above.

 No.44704

I got locked out of my mysql root user and have been trying to get back in all day. I encountered this same problem as this guy https://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run

Looking at the top replied comment about the /etc/mysql/my.cnf file, I have the file, but I'm not sure what to do with it. It's here.

orpheus@Roedelius:/etc/mysql$ ls
conf.d debian-start my.cnf.fallback mysql.conf.d
debian.cnf my.cnf mysql.cnf


It's not clear to me what the top answer says I should do with the my.cnf file to solve the error 2002 /var/run/mysqld/mysqld.sock problem I've been getting. I'd appreciate if anyone could help me with this.

 No.44705

>>44704
the my .cnf file says this


!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/


what do I do from here? the top answer in stackoverflow says to do something but I don't understand what. Can anyone give me a step by step answer of what to do with this.

 No.44706

>>44704
>>44705
Hard to help you without knowing specifically what's happening. First of all, did you try restarting the mysql service (assuming you're running Ubuntu) before you start messing with config files?

sudo service mysql start

https://stackoverflow.com/a/12833455

 No.44707

>>44706
*restart

 No.44709

>>44706
Yeah I did, but never mind my question because I managed to reset my root password somehow but now I have a different problem. My mysql server is failing to start. I worked on this shit all day so I'm going to work on it tomorrow now. Shits really makes me tear my hair out..

 No.44714

Is there a beginner challenge thing for Python?

 No.44724

>>41484
>>41485
You know you don't have to download another browser to test your javascript right?

 No.44725

>>41494
>mongodb for morons
>and not mongodb for mongs
wasted opportunity tbh

 No.44741

>>43252
ask for an extension if you need it, if you are too afraid to ask, try changing the timezone, if clock changes are locked, the timezone feature often times is not for various update reason, just tun it to a time zone behind yours

>tfw wiz changes the timezone forwards and locks himself out

 No.44907

How do you not go insane when debugging something? I'm a self taught noob and I just spent about two days trying to fix my simple login/registration function, and had to ask my question 7+ times on different forums, and the answer was just a few lines of code but no one could explain it to me correctly and just assumed I knew how to implement it even though I said I was a noob. I did some further research on documentation and found the answer to my problem which I got completely lucky by finding and I had no idea this function was required to fix my issue. I've had problems like this on several other projects I've done in the past, searching for days just to add a few simple lines of code or finding some typo in my code that breaks everything that I overlooked, and it drives me mad. This takes a lot of patience to do.

 No.44908

>>44907
Take hard breaks between sessions.
It helps clear your mind of frustration and come up with new approaches.

Also, Read The Fucking Manual (RTFM).
I can't count how many times I've tried to wing a solution by stitching together pieces, ending up actually doing more work debugging simply because I was too lazy to go from zero and read the documentation.

In your case tho, I think it's a matter of both not reading the documentation and also lack of googling skills.
Login/Registration has been done to death, every question possible has been asked, and there's countless working examples.
Can't imagine why you would need to ask 7+ questions unless it's a radically different approach to the problem.

So, try this next time when encountering a problem:
(1) Re-examine the theory of the problem you're trying to solve (example: Website Authentication/Authorization)
(2) Re-examine the tools you're using, like the libraries, frameworks and language
(3) Find working examples
(4) Finally, if you're doing something truly unique, ask a question but be specific because Internet strangers are lazy
(5) Otherwise, refine your search parameters and find an already answered question or library/framework/solution

I think the problem with a lot of "noobs" are that they start learning at the wrong place.
You've started web development without first understanding the basics in a compiled language and how a computer actually works.
You probably lack the theoretical knowledge about networking, web protocols, encryption, server-client model etc.

Can't say I have a solution, considering I was the same way. Programming since I was 12, learning things I found interesting leading to big holes in my knowledge.
A foundational approach to learning would likely be faster and more effective, but that's seldom how self-taught people approach learning.

 No.44926

any ideas of c projects that involve linux system calls?

 No.44927

How would one go about creating a basic imageboard?

 No.44928

>>44927
Well, you need to know these things:
>HTML/CSS
>a server-side language
>basic SQL, database management and communicating with the db through the server-side language

It's very basic. There's isn't even any authentication.

>>44926
FTP server/client perhaps?
You'd need to work with files, sockets and threads/processes possibly.

 No.44929

>>44386
Thanks for posting this and sorry for the late reply.

 No.44967

I've been trying to do cool projects for some time now and have made a few but it's all so tiresome.
They're always bigger than I initially thought and take so much effort to do.

When I walked outside the other day and contemplated a house complex being built, It dawned on me that the average project would be so much easier to do with someone else.

Have you guys met someone you could count on to build stuff together? Where and how did you meet if so?

 No.44968

>>44967
What projects are you building? I doubt anyone would want to work with me for free unless its for mutual benefit.

Whenever I got stuck on projects I just ask on stack overflow or other programming forums. I'm a beginner though so my questions are all at that level.

 No.44969

What's the easiest, cheapest, most secure way I can host a very simple textboard?

 No.44973

>>44969
I'd say DigitalOcean is a popular choice for personal projects.
You get a small server instance for 5 bucks a month or at an hourly rate of $0.007.
You can turn it off at any time or create another instance, or even scale it if you need more juice.

But you have to setup all your web server stuff on your own.
Basically everything you did on your home machine except through a terminal.
There's easy to follow guides on the net, so it shouldn't be too hard.

 No.44974

>>44967
I met a guy through wizchan and he's a good programmer but is absolutely anal about code styling and tool usage.
We tried to make a game together but he lost interest immediately and hasn't contributed at all since the first few commits where he yelled at me for using tabs instead of spaces and having Windows file endings.

It seems less of a hassle to just work alone. For a successful partnership you both need to have similar visions, work ethics and values.
On a paid job, that's not too important. But for personal projects it's always better to work alone since it's unlikely you'll find that person.

Also, thinking that adding more people to a project will get it done quicker is a common delusion in software development.
It adds complexity since you need to now get more people on the same page which requires excellent communication skills.
Unless you can reasonably divide the work into self-contained chunks, I wouldn't try to work with other people.

 No.44975

>>44974
if you find someone who's equally as sloppy with code formatting as you are i'm sure you'll get things done much quicker

 No.44981

>>44975
There's code formatting and then there's autistic nitpicking about completely unimportant things.
If by sloppy you mean laid back and open to compromises for the sake of working together, that person would likely focus on writing more functional code instead of playing with the formatting.

Still, I obliged his preferences and it still didn't work out because people lose interest.

 No.44983

>>44981
tabs and spaces are not the same thing

 No.44985

>>44974
>he yelled at me for using tabs instead of spaces
man, I haven't done any major programming in a long time, but fuck that guy, I hate spaces with a passion, I would seriously instantly delete/block/ignore anyone that told me to use spaces instead of tabs

 No.44986

File: 1534768787120.png (284.71 KB, 1080x1920, 9:16, KhfJjVj.jpg.png) ImgOps iqdb

>>44983
Yes, 4 characters vs. just one.
I understand that tab widths can vary, but you can set the tab width in any normal editor these days.

 No.45097

>>44974
Automatic code formatting is a must. Configure a strict linter on every project. Into the script which installs dependencies, add a command that creates a pre-commit Git hook that aborts the commit unless it passes the linting. Linters now can fix most formatting mistakes on their own, don't forget to mention in documentation for contributors how to run one.

 No.45201

File: 1536324368565-1.png (111.75 KB, 378x427, 54:61, sEBX4.png) ImgOps iqdb

I'm trying to make my text in this div not go beyond the width of the image width. This isn't a problem with most of the images I put here, but if the text is too long then the text goes beyond the width of the image and I don't want that.

How can I fix this problem?

<div class='post'>
<div class='post2'>
<img src='uploadedFiles/<?php echo $image->image; ?>' alt='$image->id'>
<h3><?php echo $image->user; ?></h3>
<p>"<?php echo $image->description; ?>"</p>
</div>
</div>



.post {

display: inline-grid;

border: solid 2px gray;

margin: 5px 10px;

text-align: center;

}

.post2 {
max-width: 19em;

display:inline-block;
}

.post2 > img {

max-height: 19em;

max-width: 100%;

}

.post2 > h3 {

padding-left : 5px;

padding-top : 5px;

color: #00ff00;

}

.post2 > p {

padding: 4px 4px 6px 6px;

white-space: initial;

word-wrap: break-word;

}

 No.45202

>>45201
Instead of max-width, set the min-width of your image to 100%.

 No.45203

>>45202
Thanks wiz this fixed it.

 No.45320

I want to make a link to go to a url that is dynamically made, but I don't know how to do this with my code. Here is my Router class `


class Router
{
public $routes = [
'GET' => [],
'POST' => []
];

public static function load($file)
{
$router = new static;

require $file;

return $router;
}

public function get($uri, $controller)
{
$this->routes['GET'][$uri] = $controller;
}

public function post($uri, $controller)
{
$this->routes['POST'][$uri] = $controller;
}

public function direct($uri, $requestType)
{
if (array_key_exists($uri, $this->routes[$requestType])) {
return $this->routes[$requestType][$uri];
}

throw new Exception('No route defined for this URI.');
}
}

and here is my routes page


<?php

$router->get('', 'controllers/index.php');

$router->get('message', 'controllers/message.php');

$router->get('loginForm', 'controllers/loginForm.php');

$router->get('register', 'controllers/register.php');


on my page with my html I put an <a>tag with a dynamic link href='displayPost<?php echo $image->id; ?> but I'm not sure how to add that $image->id; part into my router list and class to make dynamic url's.

 No.45322

>>45320
screw it I'll just not add dynamic links to my project, all the solutions I'm finding are too hard to understand. I'm going to learn a framework like symfony or laravel before I try coding dynamic links again, coding everything in raw php is too dam difficult.

 No.45346

File: 1537227262337.jpg (20.57 KB, 720x533, 720:533, f43zlca1sac11.jpg) ImgOps iqdb

How do wizards get better at programming?

 No.45395

File: 1537586458890.jpg (94.29 KB, 1024x768, 4:3, 1448077957916.jpg) ImgOps iqdb

>45346
You need to truly want to be able to program, and have things you want to do with programming beyond just making money. You also need to have the discipline to stick with it for months, perhaps a year, but that goes for learning any marketable skill.

After that, it's just a matter of picking any project (imageboard, video game, mobile nutritional tracker, etc) that strikes your fancy and learning any modern language that can do that, following tutorials, understanding programming fundamentals, and reading the goddamn documentation. Automate the Boring Stuff with Python is good if you're the practical sort. Don't worry about what the best language is, the only time that's a relevant discussion is when you're already a good programmer that has a couple paradigms under his belt (object-oriented, functional, symbolic, etc). Understanding paradigms leads to being able to pick up the syntax of a new language of that paradigm quickly.

Don't try to understand everything, programming is far too expansive a topic to do so. Don't feel bad about using libraries to get a project rolling, don't feel bad about feeling like you're working with a black box you don't understand. You might with time. You also might not, and that's fine, as there are millions of other programmers who rely on another programmer's domain knowledge to finish their project.

 No.45402

>>45395
>>45396
Time to clock out then

 No.45408

>>45322
Try implementing the following API, you'll be happier:

$router = new Router([
new Route('/^\/messages(?:\/([0-9]+))?$/', 'Message/MessageController')
]);

First route parameter is a regular expression that you match $_SERVER['REQUEST_URI'] against, second is the name of a class where you keep all the POST/GET/PATCH/etc methods for that resource. In the expression, id is optional, so you can either show all messages or find one.

$router->run();

if (empty($router->status)) {
// Success.
echo json_encode($router->body);
} else {
// Router caught some exception.
http_response_code($router->status);
echo $router->body;
}

Also delete that controllers/ folder and organize by feature, like a Message directory for MessageController, MessageService and all the helper utilities you write for your Message model. Frameworks will teach you the opposite but please try writing simply first, as simply as possible. Sorry I didn't answer earlier, not much of an attentive poster.

 No.45412

>>45408
I don't know much about back end coding, but I don't know how to add that code into my current code and its using functions like ->run and ->status that I don't have so I'm not sure how its supposed to work. From you're showing I don't know how to match my html pages and controllers with it as well.

Why should I write as simply as possible first? I've read that frameworks will teach me a better way to code rather than learning this on my own. I started learning php 2 weeks ago and all I know is from the free courses of it on laracasts, but I don't think I can go very far with that knowledge and I don't even understand the code you have for a router.

 No.45414

>>45412
Meant you should try coding them yourself. Okay, ignore that json_encode thing. Let's focus on just the matching and html output.

https://regexone.com/
https://php.net/manual/en/function.preg-match.php
https://php.net/manual/en/reserved.variables.server.php

For example, start with this for your index.php:

<?php
require(__DIR__.'/Message/MessageController.php');

$routes = [
'/^\/messages(?:\/([0-9]+))?$/' => 'MessageController'
];

$method = strtolower($_SERVER['REQUEST_METHOD']);

foreach ($routes as $path => $controllerName) {
$match = [];

if (preg_match($path, $_SERVER['REQUEST_URI'], $match)) {
$controller = new $controllerName($match);
echo $controller->$method();
exit;
}
}

http_response_code(404);
echo 'No route defined for this URI.';

And Message/MessageController.php:

<?php
class MessageController {
function __construct($match) {
$this->match = $match;
}

function get() {
if (empty($this->match[1])) {
// …your database code to get all messages…

include __DIR__.'/MessagesView.php';
} else {
$id = $this->match[1];

// …your database code to get one message…

include __DIR__.'/MessageView.php';
}
}

function post() {
if (empty($this->match[1])) {
// …insert a message into database…
} else {
$id = $this->match[1];

// …update existing message in database…
}
}
}

Message/MessagesView.php:

<h1>All messages.</h1>
…probably a form here to insert a message…

Message/MessageView.php:

<h1><?php echo $id; ?></h1>
…probably an update form here…

Save it and open /messages/123, /messages and / to verify that it works before adding other routes, methods and database code. Frameworks don't teach you how to code better, they teach you their specific way to code. But you might not need one for a little personal application, since you won't use most of its features and will likely overcomplicate your task.

Must say it's cool you got this far in 2 weeks, took me much more.

 No.45439

Ok, in c++ i want to make a map that takes a string and a vector pair that contains a string,int. Pretty much:

map<string,vector<pair<string,int>>> mapName.

I'm trying to add stuff to it like this. mapName.insert(string,vector.push_back(make_pair(string,int))).

And I'm stumped because I don't know how to add things to the vector since you can't name it doing this as far as I know. I've tried googling but can't find much on it.

 No.45444

>>45439
Several hours later and I finally figured out something so simple. God I fucking hate this shit.

 No.45448

File: 1537930227268.png (254.83 KB, 888x900, 74:75, 1522791421118.png) ImgOps iqdb

Asked this before, but how do you all go about solving things that you're stumped by?

 No.45476

I created a matlab script that will aid me in my house hunting. Unfortunately crime data is fairly useless without knowing the population of area. I found some population data for every city with city borders. The borders are shapes that outline every city with latitude and longitude coordinates.

So basically all I had to do was pick points on the map, find out what city they are in, and then associate it with the population so I can get a crime per person statistic. Great! I used matlab's inpolygon() function for that.

Unfortunately this data really isn't nicely formatted and I am a lazy fuck who didn't want to do that. I have to make some ultra slow matlab calls which is causing this processing to take forever.

I dunno why I am posting this. I guess I am just bored while I wait for this slow af code to finish, and I am slightly drunk right now.

 No.45527

>>41494
>bullshit sociology
What's even worse, he isn't even using "correct" bullshit sociology. Protestant countries are considered shame societies.

 No.46000

I need to learn some Javascript for web development. Any decent books you guys recommend on the subject?

 No.46009

>>46000
you don't know javascript is free on github and its the only book that helped me the most. After that I learned by making projects. I tried eloquent javascript too but its too technical for me to understand and I dropped in midway.

 No.46167

why do many index start from 0? seems like languages could just refer to +1 higher without much difficulty. is it some math tradition?

 No.46517

What are your thoughts on Udemy?

 No.46518

>>46167
Arrays are pointers, so the first element is at the pointer i.e. pointer+0, and the second is at pointer+1, pointer+2, pointer+3 etc.

 No.46520

>>46517
Good courses for a very beginner. Introduce you to commonly used libraries, patterns and cloud services. Still you can just read the official docs of the libraries, with an alike result if not more up-to-date in the end.

 No.46777

Please don't do this kind of shit if you absolutely have to start writing anything new in Rust. Developing on a latest Rust release, fine, even a beta version is understandable, but writing your entire build process using features from a nightly branch of a compiler built for only a few chosen platforms that needs its own binary to build itself creates quite an unpleasant loop. You might be thinking that features from a nightly will move to stable some time in the next four years. They won't. I'll boldly name this as the single reason behind how Firefox got stuck in its current limbo state. Sorry for the rant.

 No.46903

I learned the basics of java and don't know what else to do now.

 No.46910

>>46903
LibreOffice Easy Hacks.

 No.46912

>>46903
create a video game

 No.46913

>>46911
He said the basics dude
>>46910
>>46912
If he starts simple this is actually a good suggestion for a on going project to learn more.

 No.46917

>>46916
Well it was over my head when I was in the thick of learning to code.

Since I so rarely use it I have forgotten nearly everything so it probably seems even harder then it really is to me now more then ever.
Occasionally I lurk the thread telling myself I will get back into it but I never do since I never have a good reason to push myself beyond extremely simple scripting within existing programs.

Maybe if I was into a game like second life again that had where you could add code to objects based on C# that you could play around with, I would be more likely to get back into it since it would be more playing around instead of feeling like doing work/studying.
Oh well.

 No.47022

Anyone here willing to take a beginner under his wing? Feed me little projects or something you need help with so that I could have direction on what to learn and be useful.

 No.47023

>>46917
Simple scripting is the best, most useful kind of programs.

>>47022
Can share an unfinished textboard codebase if that doesn't sound ridiculously easy to you. Posted my feature plan on /meta/ in the textboard general, and you'll be able to pick up whatever catches your interest. Unlikely to be of much help in terms of advice, support, appearing online or responding to messages though.

 No.47024

>>47022
Exercism.io has small exercises you can complete in any language and get feedback on.

 No.47033

>>46913
Coding a neural network, from scratch even, is MUCH easier than a video game.
If you don't do it from scratch especially, then libraries make it very easy

 No.47077

>>45448
I start drawing control flow or objects/interactions with boxes and arrows. Sometimes I include (pseudo)code in these modules, but frequently I begin from a higher level of abstraction. A whiteboard is usually good for this, but I always have graph paper on hand just in case. A blackboard is the most comfortable, but those aren't very common and you have to be careful not to get chalk in your keyboard.

If I can't come up with a design that I like, then I walk through everything from the beginning. I ask myself: what am I starting with, and what are my desired outcomes? What are the high level components? And other similar questions. Basically, the idea is to strengthen your understanding of the problem and of your desired result; this understanding will help you form the high level building blocks for the solution and how they interact with each other. I usually speak this self-Q&A aloud while taking notes and drawing more boxes and arrows.

 No.47078

>>45448
I keep changing variables that I guess might be related, and curse until it works.

 No.47539

idk if anyone else knows, but windows batch scripting is easy to pick up. it has some severe limitations compared to virtually any real programing language, or even other operating systems shell scripting languages, but if you are on windows it's still kind of cool

for example just open up up notepase and type/paste this, then save as runme.bat or runme.cmd, then double click it

@echo off
set yourvariable=wiz
echo hello %yourvariable%
pause



any text-based game or interactive program can be made pretty quick. here's some descriptions of the commands i use often, or examples of the usage
set x=1 <assigns local temporary variable>
set /a x=y+z <same as above but allows simple artithmatic>
if %x% equ 1 (set y=2) & (set z=3) <using if. %variable% uses the value of the variable. "&" is a way to separate commands>
if %y% equ 1 if %x% equ 3 (echo ASFFDGgd) <if can just be stacked with other ifs to next them. echo prints out text>
goto example <makes the program go to :example>

:example <label, serves as jump point for goto>
if age geq 5 (set dog=blah) & (set blahblah=blahblahblah) ^ <this " ^" escapes the end of line character, lets commands be broke up over multiple lines if they get too long and hard to read>
(set asdfsdfsd=sadfasdf) <this is considered part of the above if condition>

if something equ nothing (set example=55) || (set example=99) <the "||" means if the previous thing fails, or isn't true, it runs the command. i think it means OR>

echo a - first choice
echo b - second choice
echo c - third choice
choice /c abc /n <halts the program, only continues if they press a,b, or c. the /c and /n are just some options i like with it>
set yourchoice=%errorlevel% <if they press a, that sets errorlevel to 1, b-2, c-3, etc>
if %yourchoice% equ 1 (echo first choice)

pause <pauses the script, and displays message letting you know to press something to continue
cls <clears the screen of text>

setx catdog=dogcat <this is setting a permanent variable, but you can only use it later, not in the current batch file>

there's a few variables and "cmdlets" you can use as well to do stuff, %username%, %cd%, %date%, %time%

timeout 600 /nobreak <halts script. after 600 seconds, script continues. /nobreak means you can't interrupt it>
shutdown /h <can hibernate computer>
cipher /w:c:\ <wipes the deleted/unallocated space on c: drive by overwriting with random data or something. basically after running cipher you can't recover deleted data. all windows have cipher>
taskkill /f /im openwith.exe <terminate tasks like how you normally would by using task manager>
@RD /S /Q "C:\$Recycle.bin" <effectively clears recycle bin>
net stop WaaSMedicSvc <can stop services>
title command shortcuts <renames the command line interface to "command shortcuts">
color f0 <sets the command line interface background color to white, and the text color to black. opposite of how it is normally>
@echo off <used at the start of scripts for a cleaner output>
type example.txt <prints out the contents of example.txt if example.txt is in the same directory as the batch file. otherwise you specify filename>

there's also CALL used for creating subroutines and functions, but i haven't even used it once. you can call labels or other programs i think.
also there's piping to output or input stuff, also haven't used that though.




in general you can use set, set /a, echo, choice, and goto for simple games without any problem. those have made up like 99% of the commands i use.


here's some other stuff a bit more complicated using other program's command line functions, but i'm not a programmer so it's not that hard. this series of scirpts is started by dragging a folder containg .png files onto the batch file. the location of the folder dragged is %1, %cd% is the directory of the batch file itself, and the programs with command line functions i can utilize are all in the folder 'scanmate' on the same directory as the batch file itself

%cd%\scanmate\advanced_renamer_portable\arenc.exe -e %cd%\scanmate\alphanumeric-to-numeric.aren -t files -p "%1" -msk "*.png" -o filename -m rename
>this uses the program advanced renamer to rename .png files alphanumerically counting up from 01.png

for /r "%1" %%a in (*.png) do (%cd%\scanmate\optipng\optipng.exe -force -v -o2 "%%a")
>this uses optipng to compress the .pngs

echo ARCHIVE FORMAT:
echo 1 - ZIP
echo 2 - RAR
choice /c 12 /n
set cnum=%errorlevel%
if %cnum% equ 1 (set archiveformat=ZIP)^
else (set archiveformat=RAR)
set /p archivename=%archiveformat% ARCHIVE NAME:
%cd%\scanmate\winrar\rar.exe a -r %1\%archivename%.%archiveformat% %1\*.png
>choice for zip/rar. prompt for the filename. then uses rar.exe to archive the pictures using the format and filename.

 No.47540

>>47539
batch is pretty fun, that's how I started programming when I was 12, I'd make tons of stupid little programs in batch and show them to my parents

 No.47567

>>42238

What? Most cheats hook into the game directly and track positions based upon looking at a memmory location.

Is yours really based upon scanning the screen directly?

 No.47608

File: 1553650189762-0.jpg (599.45 KB, 474x743, 474:743, 10 print.jpg) ImgOps iqdb

File: 1553650189762-1.png (123.94 KB, 1105x1080, 221:216, 10 print 2.png) ImgOps iqdb

output from what people now call a 10 print program/pattern. it was originally a single line of code in basic that would randomly print either / or \ and fill the screen. some people actually found it interesting enough to write a book about it. example are found online https://snek.dev/10print

the cool thing is that when rotates 45 degrees, it is like a maze, using only 2 characters. but because it's random it's not a very good maze and you can see using paint bucket to fill either side, there can be ver large sections that are uncrossable

 No.47613

Tired of having to make multiple different commandline parsers I've been programming a generic unix-style command line parser.

I know I don't have to, libs exist, but I code everything from scratch (and all libs have security vulns).

Nothing impressive. Just –xxx-xxx and/or -x added to an iterative AVL tree implementation, with doc strings to generate the –help output, and fn pointers to call upon encountering a parameter.

 No.47624

>>47613
is command line parsing interpreting some input command and arguments to pass to some kind of function or other program?

 No.47691

>>47567

Yes. It is easier and less intrusive to scan the screen, making the cheat impossible to detect.

 No.47694

File: 1554492524953.mp4 (3.83 MB, 1920x1080, 16:9, archive.mp4) ImgOps iqdb

testing something using curl, ended up returning a lot of old threads like >>>/wiz/74

would be cool to get images but the text of a post is more important anyway

 No.47696

>>47691
CS noob here but you're programming in C right?

 No.47704

File: 1554651586140.jpeg (9.12 KB, 222x227, 222:227, crackpairingmirite.jpeg) ImgOps iqdb

I feel like most of my time programming is not spent…programming

Instead it’s what I would call “bullshit one-off IT problems.” I need a weird library and spend a day trying to track down the particular version I need because it’s not in any package manager, of course. Or I have to use some function that I do not understand how it works, nor can I track down the documentation for what the error code “E705” that it keeps popping out (c.f. the error codes hidden in LAPACK hidden in GSL), nor does ANYONE know how it works. Or I spend two days just figuring out how to get weird library X to work with my set of bullshit code, or how the library calls even work, or a version that doesn't require me to learn two or three other lirbaries just to call the one function I want to call. Or, my workstation is a Windows x64 distribution whereas the compiler I need to use only supports a Debian i686, but that’s O.K. because then I can cludgily call it if I manage to make an executable on the separate workstation—if I can manage to get the particular version of Debian the damn thing works on. Or my IDE breaks and gives some mysterious code (or I’ve even run across kernel faults) that I have to track down even though it doesn’t even come up on websearches, and I get sidetracked fixing my computer for a couple days. Or, I need to register some odd account on a website a client uses and take forever to figure out what should be a simple web-portal that instead has evolved 3 million widgets (imagine a screen just filled with more buttons that the cockpit of the space shuttle) over the past 30 years that all interact in the most obscure of ways.

When I actually finally get to the problem after a week, I end up only writing at most a hundred lines to solve the actual problem.

 No.47705

>>47704
I wish I could only write a hundred lines to solve an issue, usually I end up writing a few thousand. The less code and the fewer dependencies you introduce, the more quality thing you create.

Btw, simple web-portal is an oxymoron.

 No.47709

>>47704
Same, the second you step outside the standard and most popular libraries/frameworks you are in the middle of a gigantic minefield by yourself without an end in sight.
I loathe working with most programmers code, but reading their documentation (if it even exists) is even worse, things almost never work as they should.
Last week I spent 3 days setting up and trying to use a small library for a very specific use. The thing kept throwing all kind of errors that didn't make any sense. Found one single example of code in the documentation which was 2 years old, the only way to make this library work as intended was to use a 2 year old version in debug mode.

 No.47710

>>47709
What language or ecosystem is that? I never have these issues when dealing with Node.js or pure C and simple focused libraries, but projects in Java and C++ and enterprise frameworks regardless of the language turn out abominable hell with conflicting dependencies every time.

 No.47711

Somebody in a chatroom kept pushing python as the best thing ever, I've only ever worked with C# and I think python seems like it's over-hyped and a meme.

 No.47712

>>47710
>language
>ecosystem
It's never one language/ecosystem. It's whatever package/library/language that needs to be found and pulled together to get the project to work.

 No.47718

>>47711
How can Python be overhyped when it's much less widespread? Personally I like how compact and readable it lets you script GUI and text file operations, but altogether it's huge and I don't appreciate its presence and sometimes requirement in base Linux systems in a similar way that C# is on Windows.

>>47712
I don't understand, why are you pulling in those packages, libraries etc unless you're sure they work and integrate fine? Nobody should be adding languages to projects, the mention of "pulling together" such enormous third-party components clearly sounds like someone up the business chain is making disastrously incompetent decisions.

 No.47719

>>47711
man i hated python for the mandatory indentation and case sensitivity. they really wanted every program to look the same way regardless of who wrote it. it's super popular in universities and just common usage though from what i've read

 No.47720

>>47719
is any modern language case-insensitive? Why?

Our university had C# and x86 assembly. Python crowd here is mostly self-taught.

 No.47726

>>47720
i can only think of ring

 No.47776

>>47707
CS noob here again, I thought gc langauges don't allow pointer arithme
tic

 No.47819

Fuck magento, what a fucking obfuscated undocumented piece of shit. And fuck this company for making an intern use it.

 No.47900

Has anybody here ever thought about writing their very own AI waifu?

 No.47902

>>47900
You can probably make a program that gives the illusion of a waifu but we haven't figured out a way to make sentient AI yet. What's the point anyways? If you write the program then you know how it exactly works so it is impossible to fool yourself.

 No.47914

>>47900
One of the main reasons why I got into science and programming was to make an AI.
Kinda like in the 1995 gits movie.
That stuff is fascinating.
I don't think anyone's close to achieving that though, although deepmind is doing interesting stuff.

 No.47948

If you're feeling incredibly irritated, anxious and frustrated at the start of learning how to code is it perhaps the wrong thing to try? Has anyone else started out feeling like this?

I am avoiding learning because of this but I want to do the course on Khan Academy before I completely give up on it

 No.47950

>>47948
I started learning java when I was 13 coding runescape private servers, literally just doing trial and error coding until I understood what was going on. That felt really rewarding to me, I never got frustrated but I got excited because I was making cool stuff in runescape. I assume those khan academy exercises are boring though

 No.47960

>>47950
They're not boring. Part of the problem is me so that's why I don't just give up yet.

What goes through my head is
>I'm starting this at 25 so what's the point?
>There's so much to go through and I'm an idiot

I can't tell if I'm having trouble because I don't like it or because of my self confidence issues

 No.47963

>>47960
It seems unrelated to your interest in programming. You'd likely experience the same feelings towards any hobby or skill. Nothing else to do except push on and focus on the process. Perhaps once you observe your own self-efficacy, you'd gain more confidence and some relief for those pesky feelings.

 No.47966

File: 1556813212358.jpg (123.82 KB, 540x762, 90:127, essense.jpg) ImgOps iqdb

>>47963
This is what I was thinking. Ill go through the classes and if I still don't like it Ill move on. But I gotta push through the starting pains. Thanks for the input anon.

 No.48704

I'm 2 weeks into a codemonkey job and starting to hate programming.
I used to like messing with the computer, writing small programs, understanding how things work behind the scenes, configuring my system etc. And now after this short period of being _forced_ to write code I'm actually adopting the idea that computers should "just work" and considering switching back to windows and using bugged, resource heavy spyware because it's too much hussle otherwise.
How to I prevent this process from going further and revert it back to normal?

 No.49221

File: 1565545489784.mp4 (1.38 MB, 1280x720, 16:9, game1.mp4) ImgOps iqdb

was playing with idea of a vn kind of engine yesterday, this is what i got so far using autoit. the script part looks weird like a batch script right now but it works at least

 No.49272

I don't know if it's qualify as programming but given the fact this is the best place to ask I'll give it a shot. Do you guys know any good places to learn html? I've done the codeacademy course but you don't learn much in there. I was looking for something a little more extensive.

 No.49273

>>49272
There really isn't much to learn, in html you use tags to specify how a document is structured. There's a lot and even web developers don't use most of them. It's pretty much a learn as you go thing.
Best thing you can do is learn the basic structure and tags (html, head, body, a, p, div…), try to write your website/document and google whatever you don't know how to do i.e html embed audio.

The mozilla documentation is usually good for html/css/js. I haven't went over any of the tutorials but if I need to check how X thing works I check here or the first stackoverflow google result.
https://developer.mozilla.org/en-US/docs/Web/HTML

 No.49274

>>49273
Thnks for the quick response wiz. I guess you're right, I'll just continue doing the css exercises from codecademy as there's lots of html in there and once that's done I'll try to build a small website.

 No.49276

>>49273
I'm not >>49272, but I too would like to work with HTML/CSS/PHP a bit. I did it a lot as a kid. I remember being able to just open a plain HTML document and then build up a page in pure WYSIWYG realtime with Firebug but that was like 10 years ago and I can't find an equivalent now.

If anyone working with it has any tips on how to set up a seamless work environment for such things, that would be cool. What browsers/extensions/programs to use so that I can say, edit the HTML or CSS in an editor in one monitor, and the browser updates the webpage using it in realtime or with a simple refresh in the other monitor.

 No.49362

I need a c# project idea. I want it to be something related to security/cryptography. Any Ideas?

 No.49379

>>49362
You might make an encrypted chat program. Would sed be a challenge

 No.49389

>>49379
That might be a good idea. Got any pointers for where to start with encryption programs for c#?

 No.49485

anyone know a good way to produce a vector image using several thousands points? like for example to draw a square you'd just have 4 points and they would be connected. i'm considering just simulating mouseclick/move and drawing one point, then a line to the next point, etc with a vector image editor

would be cool if there was a program that could just accept a list of x, y values

 No.49486

>>49485
actually just information on a simple vector image format that is easy to understand would probably help if i can just create the image directly

 No.49487

File: 1567025500051.png (22.05 KB, 1150x1080, 115:108, t est.png) ImgOps iqdb

>>49486
uh nevermind im fucking retarded, i didn't realize how simple SVG is, it's like plaintext you just paste the fucking points in there

 No.49489

Ahaha, I broke the gcc in my windows. Nothing fucking works, not Eclipse, not Netbeans, not Codeblocks. I may be a beginner retard but it shouldn't be this hard to build a hello world program. I mean I can use an ide with its own compiler like devC or an online one but I am still mad at these garbage software that's different from than everyone else online. Eclipse and Netbeans won't build binary files or whatever. Codeblocks keeps telling me that some dlls is missing when it's right fucking there. I even deleted my mingw and reinstalled it directly from the codeblocks installer. Nothing online helps. Maybe it's time to try out linux. Hope it's not some epic /g/ meme and is actually useful.

 No.49490

>>49489
>hello world program
that's a lot of work for that, just pick up an interpreted language or something if you just wanna learn how computers work

 No.49491

File: 1567049268533.webm (1.87 MB, 1280x720, 16:9, apu light.webm) ImgOps iqdb

>>49490
I'm trying to do a rudimentary lightning system with c++ using sfml.
What I did was creating a vector of small black squares (5x5) that covers the entire screen and each frame I check distance to source (mouse in this case) and adjust the alpha accordingly.
Pretty simple, thing is, it annihilates the framerate.
How do 2d games usually do lightning?

 No.49492

>>49491
I'm sorry, I didn't mean to reply.

 No.49495

File: 1567052699586.png (2.96 KB, 1000x1000, 1:1, light dark.png) ImgOps iqdb

>>49491
they route computationally intensive sections of code to run on the gpu, and they also utilise multicore programming, and they use engines that have already worked out efficient implementations for stuff like lighting

most importantly though they cheat and use tricks. one trick they would use is just an overlay constantly positioned to the cursor to achieve that effect

 No.49503

File: 1567097075171.webm (1.12 MB, 1280x720, 16:9, apu overlay.webm) ImgOps iqdb

>>49495
Yeah an overlay works great but I was trying to something for when I have more than one light source.
Now I'm trying to learn about blending. Man there's so much to learn. At this rate I'll never be able to make anything.

 No.49510

>>49489
it's a pain to do a lot of development tasks in windows
try with vscode there might be a plugin to compile C easily without installing visual studio

 No.49513

>>49489
Why gcc? If you're on Windows it's much better to use something that actually works natively such as DevCpp, PellesC or even Visual Studio. But in case you really want to use gcc, you can always install Linux distribution inside virtual machine.

 No.49524

>>49503
Wow using color blending was so easy I feel retarded because someone had to actually tell me how it was done. And I struggled all afternoon with this.

 No.49547

>>49490
I don't really just want to learn computers. I want to be kinda serious. But it really is a lot of work. I though beginner's linux would be easy but I still get errors I wasn't in the mood to deal with.

>>49510
Thanks, but I already restored my system and got codeblocks to work. It's still a pain to set up some other things though. Now I finally understand why people hate windows.

>>49513
All the "big name" IDE that's popular in the industry usually use gcc though. Eclipse, Netbeans,and Codeblocks use an external compiler which is usually recommended to be MinGW. Visual studio could work but I don't really want to use them unless it's for .net languages.

 No.49548

>>41214
Been working through "Automate the Boring Stuff With Python lately. Its great so far

 No.49781

File: 1568128471080.png (330.26 KB, 1920x1080, 16:9, 2019-09-10-171211_1920x108….png) ImgOps iqdb

Since CSS is technically a programming language. There is a userstyle out there called "Base 16 for 8chan" that works on here that I tweaked to match my system's colours. The difference is small but it's satisfying. I also made it use variables so it can be easily ported to other themes from base-16 family.

 No.49782

played with inform7 today after going through the documentation. all i can say is jesus christ. i dont get these programming languages using 'natural language'. it says to be intended for programmers interested in writing, and writers interested in programming, but i dont think syntax has ever been the most difficult part of learning most languages. everything is a god damn sentence requiring. instead of briefly checking over a syntax guide, you are required to learn a completely different way of speaking english. everything has to be written very specifically. instead of making a quick game it's become more or less a prescriptivist grammar lesson. natural language processing, at least whatever they are using, i NOT developed enough for this to be anything but a chore. it still seems really cool and powerful for text based simulated interactions between things, and i'll continue, but it's not fun

 No.50080

Do we have any wizzies with a strong interest in security?

 No.50088

>>46009
just wanted to say thank you for this post. different wizzie than the one you replied to and i'm reading it almost a year later but this is a great book and it's helping me a lot. thanks.

 No.50089

>>50080
Yes. I studied different things when i was at university, so now that i'm an unemployed neet im reading about it and might try to get some certification/s


[Last 50 Posts]
[Go to top] [Catalog] [Return][Post a Reply]
Delete Post [ ]
[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]