Is it considered acceptable to put pretty much an entire project into a question here? I don't have a specific thing I'm looking for help with, I pretty much just want to say "I'm new at this, how do I make my program better?".
So I have to ship servers on Friday with software I have not finished writing. Not only have I not finished writing it, it needs to be tested... oh boy
@syb0rg Nah, code golf is still my one true love. I just believe that golfers and people who care about their code not being terrible can live in harmony, and dabble in the other practice occasionally. :P
C - 64 characters, 64 points
main(int a,char**b){b++;qsort(*b,strlen(*b),1,strcmp);puts(*b);}
You might wonder how I get this to work without any headers. Simple, compile with:
gcc -include stdio.h stdlib.h string.h test.c -o test --std=gnu11 -Wall -g -O3
Un-golfed:
#include <stdio.h>
#i...
namespace Foo.App_Start
open System
open System.Web
open Microsoft.Web.Infrastructure.DynamicModuleHelper
open Ninject
open Ninject.Web.Common
type NinjectResolver(kernel:IKernel) =
let _kernel = kernel
interface System.Web.Http.Dependencies.IDependencyResolver with
member th...
I am toying with C++11 lambdas and was trying to mimick some function from the functional module of the D programming language. I was actually trying to implement curry and compose. Here is the main that I am trying to get working:
int main()
{
auto add = [](int a, int b)
{
retur...
I've got some architecture in my code similar to this. It is about the Construct method in the base class in the example below. This method contains the logic for constructing a building, which is the same in every building. Yet different buildings may want to do things differently, like a differ...
For a typical if...else wrapped with exception handling, is something like the following example a recommended practice to avoid code duplication?
try
{
if (condition)
{
DoSomething1();
}
else
{
throw new Exception();
}
catch
{
DoSomething2();
}
inst...
I'm uploading arrays of image URLs to save to S3. The code works, but it is not executing asynchronously. Time stamping to the console appears to show that first all the images are fetched and buffered, and then they are sequentially saved to S3. I ran an array of 100 images, and the first imag...
This is my first ever real 100% self made perl script, I'd like to know how I can improve it.
#!/usr/bin/env perl
#this script takes a directory and sorts the files into folders by file ending
use strict;
use warnings;
use File::Copy;
sub sort_files {
my $dir = shift || '.'; #cwd if no...
I made a stack monad that lets one manipulate and control values on a stack.
I want to know if it's correct, (it seems correct), how to make it faster, and how I could detect stack overflows without carrying around the stack size and checking against it, (I've heard about guard pages but I have ...
I was asked to provide the solution of this rolling dice problem in an interview. When I showed him my solution, he said that there is another way to find the solution. I am looking for answer in PHP script only.
Question:
Two persons are playing a game of rolling 2 dices. Each person ro...
I've written a program to simulate a game of Mafia among several bots. Here's the directory structure the program lives in (to make understanding parts of the program easier):
/
start
README.md # Readme file
wtfpl.txt # License
controller/
main.py
messages.py # Contains a l...
Meme: Jamalized
Originator: Jamal ♦ (actually, apparently me)
Cultural Height: All over CR (see this chat transcript search)
Background: Jamal being a frantic editor. And he's fast. So fast, we're all waiting for the day he will edit a bad question title before it's even posted. You never know...
Yeah, so far the edits to the question have been "adding tags that I didn't know would be relevant because I need to lurk moar" and "fixing the title. why did i even think that would be a good title. wtf, me."
I've made my first module for node.js for sending sms. I would like to evolve in open-source development, so.. could you please leave some feedback/critics?
https://github.com/avasin/silverstreet-sms-adapter
P.S. not ad for Silverstreet, i just used them in one project, did not found any adapte...
And I mean, literally the whole point of this site is to make code better. If code is good, that's hard, but the people here would have a field day with terrible code! It'd be like a breath of fresh air! (I'm assuming that's how it works.)
true true. I will post some code once I choose clear direction on this thing that I am working on ; I am doing some Unity game stuff and trying to find best approach for 2D fluid with plane shader applied.
I think it is fair to say, that in this chat room, it is not commonly seen, and, scanning the actual times it was used.... they all seem 'tame' and not offensive or directed at anyone....
@BlueBug / @undergroundmonorail - this is somewhat entertaining, but if this is an extended discussion about GDSE/chat then it should probably be taken back there.