Jump to content

Programmers Lounge

deafboy
On 7/18/2017 at 5:14 PM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

I don't think so. In my opinion stack overflow should only give you basic idea how to solve your particular problem and you should modify and expand it to fit your needs.

Link to comment
Share on other sites

Link to post
Share on other sites

On 18/07/2017 at 4:14 PM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

In what sense? I find it to be outright toxic so I stay well away.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/18/2017 at 8:14 AM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

I find it to be quite informative for more recent issues, haven't posted a question myself so can't comment on how strict the community is.

CPU - Ryzen 7 3700X | RAM - 64 GB DDR4 3200MHz | GPU - Nvidia GTX 1660 ti | MOBO -  MSI B550 Gaming Plus

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/18/2017 at 8:14 AM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

Let's put it this way. If you're asking on an opinion for a system build would you rather have:

  • "ryzen" as the only response
  • Pointing out where there are shortcomings, why they are, and recommendations

At least that's how I interpret it.

Link to comment
Share on other sites

Link to post
Share on other sites

On 18.7.2017 at 5:14 PM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

Stackoverflow is not meant to be your average forum, but a repository where you can find solutions to problems. A repository is to be kept clean, but because that is a lot of work a system of self-control is employed with incentives. It's not perfect but sorta kinda works.

Link to comment
Share on other sites

Link to post
Share on other sites

On 18/07/2017 at 4:14 PM, TheComputerdude said:

Does anybody feel like stack overflow is way to strict?

I find it can be.


I do appreciate the strict-ness for answers, it does stop the low effort ones of just "How do I do X?" and then a reply of "Use Y framework" and thats it.

 

Where the strictness can get to me is the closing of questions as duplicates.

Its fairly infuriating to find that someone has had the specific problem you did and its a tiny difference to the "standard" case, you find it on StackOverflow and then realise that its been closed and is pointing back to the answer you already tried a few hours ago that doesn't at all deal with your odd edge case.

CPU: 6700k GPU: Zotac RTX 2070 S RAM: 16GB 3200MHz  SSD: 2x1TB M.2  Case: DAN Case A4

Link to comment
Share on other sites

Link to post
Share on other sites

Has anyone tried rust? I've been using it for a little over a year and been loving it so far.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, cyberunner23 said:

Has anyone tried rust? I've been using it for a little over a year and been loving it so far.

not really. sounds interesting but i thinks thats a bit more low-level than what im used to

"You know it'll clock down as soon as it hits 40°C, right?" - "Yeah ... but it doesnt hit 40°C ... ever  😄"

 

GPU: MSI GTX1080 Ti Aero @ 2 GHz (watercooled) CPU: Ryzen 5600X (watercooled) RAM: 32GB 3600Mhz Corsair LPX MB: Gigabyte B550i PSU: Corsair SF750 Case: Hyte Revolt 3

 

Link to comment
Share on other sites

Link to post
Share on other sites

It's magical code that makes your program go from this:

Spoiler

screenshot_23.png.7bf022d26547f547c89afbade2b7559d.png

to this:

Spoiler

screenshot_22.png.e388ae0e5c648e3616a15c3f432f4841.png

All it takes is changing an if statement into a while statement, I don't even understand why it makes flip out this badly.

var object = function (color) {
	
	// Define our matrices
	this.x = [];
	this.y = [];
	this.s = [];
	
	// Set out color
	this.color = color;
	
	// Set our scale factor.
	this.scale = 0.5
	
	// Set our range of detection.
	this.range = 20
	
	// Set the offset of our vertex
	this.offset = [GetScreenWidth() / 2,  GetScreenHeight() / 2];
	
	// Create our pen.
	this.pen = new pen(this.color,this.offset);
}

object.prototype = {};

// Adds new points to the array.
object.prototype.addPoint = function(x, y, s)
{
	this.x.push(x);
	this.y.push(y);
	this.s.push(s);
	//Print("Added point " + x + "," + y);
}

// Resets the offset
object.prototype.resetOffset = function()
{
	this.offset = [GetScreenWidth() / 2, GetScreenHeight() / 2];
}
	
	
// Renders our object.
object.prototype.render = function (ox, oy)
{
	// Resets our clock
	f = 0
	while(f < this.x.length)
	{
		// Grab the current position of the mouse.
		mouseData = [GetMouseX(), GetMouseY()];
		
		// Set our cache to I forget
		cache = [(this.x[f] * this.scale) + this.offset[0], (this.y[f] * this.scale * -1) + this.offset[1]];
		mCache = null
		
		// If the point exists, draw it.
		if (f == this.x.length)
		{
			this.pen.draw(cache[0], cache[1], this.s[0]);
		}
		else
		{
			this.pen.draw(cache[0], cache[1], this.s[f]);
		}
		// Make sure the mouse isn't already clicked, if changed to a while statement, prepare for your GPU to shit itself.
		while (IsMouseButtonPressed(MOUSE_LEFT) == false)
		{
			// If the mouse is on a point, allow interaction.
			if (mouseData[0] < cache[0] + this.range)
			{
				if (mouseData[0] > cache[0] - this.range)
				{
					if (mouseData[1] < cache[1] + this.range)
					{
						if (mouseData[1] > cache[1] - this.range)
						{
							// Draw an indicator over the point we want to modify.
							Rectangle(cache[0] - 4.5, cache[1] - 4.5, 9,9, CreateColor(0,255,255,255));
							
							// If the mouse is clicked and held begin operations on point.
							if (IsMouseButtonPressed(MOUSE_LEFT))
							{
								if (mCache == null)
								{
									mCache = f;
								}
								this.x[mCache] = (mouseData[0] - this.offset[0]) / this.scale
								this.y[mCache] = (mouseData[1] - this.offset[1]) / this.scale * -1
							}
							else
							{
								if (mCache !== null)
								{
									mCache = null
								}
							}
						}
					}
				}
			}
		}
		
		Rectangle(cache[0] - 2.5, cache[1] - 2.5, 5,5, CreateColor(255,0,255,255));
		f = f + 1
	}
}

 

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 31.7.2017 at 0:37 AM, cyberunner23 said:

Has anyone tried rust? I've been using it for a little over a year and been loving it so far.

It's a cool thing to learn, but I just feel that it's too low-level for me. I just can't find any real situations where I would choose it over any other language.

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, Madd said:

It's a cool thing to learn, but I just feel that it's too low-level for me. I just can't find any real situations where I would choose it over any other language.

It is a system's programming language after all, has situations where its great and others where its horrible. Just like any language.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 weeks later...

Hi guys my name is Martin and started coding when i was 21/22. After enjoying what i learned at that age I finally decide to go to university to which I done BSc Computing which allowed me to learn languages such as C#, HTML, CSS, JS, NodeJS etc etc. 

Currently work for an ICT Consultancy who provide software solutions to clients as well as advice. 

In my spare time i like to play video games as well as doing some side projects in web development and on my raspberri pi. At the moment I am building myself a portfolio website from scratch using Node, Express and Mongo with a mini CMS to allow me to control and add to my portfolio.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...
On 4/25/2017 at 8:52 AM, UnbrokenMotion said:

I've been working on some code to render an isometric tilemap with the capability of rotating the camera 360 degrees. I can render 1 row of tiles, but I have no idea how to go about rendering multiple rows.

 


this.clear();

wide = 10;
high = 10;

an = 0;
b = 0;
co = [0, 0];

this.up();
while (an < wide)
{
  while (b < high)
  {
    b = b + 1
    co[0] = (co[0] + this.tWidth[rot]);
    co[1] = (co[1] + this.tHeight[rot]);
    this.gotoXY((co[0] + this.tWidth[rot]), co[1] * Math.cos(0.935));
    this.doStamp();
  }
  an = an + 1
};

 

Probably just gonna rewrite the entire section of code and use this post as a backup copy.

Make a function and utilize recursion

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/23/2017 at 8:56 AM, Lumi said:

Make a function and utilize recursion

That's what I was doing at the time of writing this, the code in question was just a sample taken from an function I had written.

 

I'm actually rewriting an improved version of the original script that allows me to integrate it into the GUI framework I'm writing.

The reason is because I ran into a weird issue where the cursor was having problems with detecting multiple windows and such.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

Hey fellow programmers,

 

Fairly new to the Forums so just wanted to say 'hey'.

 

I'm currently doing my PhD at MIT in Computational Science and Engineering.

 

I write computational mechanics software mostly, so basically PDE solvers using something called SPH (and MPM). We work on making some of the physics look half decent (image* below if it works) but we still have a ways to go. 

 

Backend of the code is written in C++ but the spirit of C, very few objects. Fully parallelized on CPU and working on CUDA acceleration as well (though having some issues with the way we want to try it). I guess I'll just list what I use:

- VSCode/Nano/VisualStudio

- CMAKE

- C++/Python

- OpenMP

- CUDA

- SWIG (really cool way to make a python library from the C++ code and lets users write python scripts, fast and reasonably user friendly)

- Paraview  & Houdini (for visualisations)

All of it is compiled for Linux (where our super computers run [specifically Ubuntu and CentOS]), macOS (coz...umm okay), and Windows 

That's mostly what I work on for my research but have been playing around with Node.js, AWS, JavaScript, and just various stacks. 

 

But yeah happy to chat about any/all of this stuff. Looking forward to being a part of these forums!

 

 

Sam.

 

dambreakStill.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

Never actually looked in this section, but why not?

 

I'm a current undergraduate at the University of Iowa studying Computer Science and Engineering.

 

My first language was Java, learned it in high school through the AP course that was there.

 

Here at university, I mainly use C++ and have done a little work in MATLAB.

 

My main OS is Windows 10 Pro, but I have messed around a bit with raspbian on a Raspberry Pi.

 

 

*go Hawks*

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

I use a mac.

I mainly code in Python or Java so for my IDE's I use PyCharm and Eclipse. I also like to dabble in html and css a little so I use atom for that. I am currently still in highschool. I am looking to go to the University of Waterloo for a joint program with Laurier which is Computer Science and Business.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

Linux and OS X user. 

I work with Java, C++, and Python for pretty much everything I do, and PHP/HTML/CSS/JS for web dev. 

I use Eclipse for Java/C++, and Atom for everything else. 

I’m looking for a dedicated Python IDE, and I’ve heard PyCharm is pretty good. Any suggestions or recommendations would be appreciated. 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...
On 1/13/2018 at 11:39 AM, Pyth said:

I’m looking for a dedicated Python IDE, and I’ve heard PyCharm is pretty good. Any suggestions or recommendations would be appreciated.

I've used pyCharm. For python only stuff it's my favorite so far. It is pretty comparable to Visual Studio's python experience in my experience. (that was a weird sentence).

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

Hi, I'm an electronics engineering student and id like to make some smart home devices, i'd like to know what programming languages I should try to learn.

I'm more interested in the hardware side, so i guess C and Assembly would do.... I know some VHDL basics too. I know most companies wouldn't want to share that stuff but does anyone here have some recommendations?

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, Willi said:

Hi, I'm an electronics engineering student and id like to make some smart home devices, i'd like to know what programming languages I should try to learn.

I'm more interested in the hardware side, so i guess C and Assembly would do.... I know some VHDL basics too. I know most companies wouldn't want to share that stuff but does anyone here have some recommendations?

In embedded systems it's mostly C. You might find C++. I wouldn't bother with assembly aside from the basics because it's different for every architecture once you move beyond the basics.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, M.Yurizaki said:

In embedded systems it's mostly C. You might find C++. I wouldn't bother with assembly aside from the basics because it's different for every architecture once you move beyond the basics.

Thanks, I knew about Assembly being different for each architecture (we learned some basics of a custom RISC processor from our college and an ARM), but i guess knowing the basics would help. Would object oriented programming help?

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, Willi said:

Thanks, I knew about Assembly being different for each architecture (we learned some basics of a custom RISC processor from our college and an ARM), but i guess knowing the basics would help. Would object oriented programming help?

I would say so if only to get more perspective on how to organize and design your source files.

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, M.Yurizaki said:

In embedded systems it's mostly C. You might find C++. I wouldn't bother with assembly aside from the basics because it's different for every architecture once you move beyond the basics.

Objective C would also be useful here, although rare.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

Also @Willi, read up as much as you can about programming concepts. It's not so much what language you know but rather how much you know in general. I mean, sure you should know some languages and their quirks because that's what people use, but I learned much more about how to program and design my applications through reading about the subject in general than look at someone's code (after all, poorly written code would only promote bad habits).

 

Like this is a book I recommend you should read: https://www.amazon.com/Art-Readable-Code-Practical-Techniques/dp/0596802293

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×