@amon I did read the blog post, and the comments, and another blog entry linked to in one of the comments. And I agree with the comments that say the contrast is nonsense.
I've been playing around with Clojure for a while now, and one of the tasks I occasionally find awkward is parsing input. For example, I took part in the facebook hacker cup recently, where part of the challenge was to read input like this:
5
4
..##
..##
....
....
4
..##
..##
#...
....
4
####
#...
Want a step-by-step through it? I'm the original author of the polyglot.
The easy versions are Python, Perl, and Ruby: the only code executed is
print(202*2);exit();
because they all treat # as a line-comment. Obviously, the code prints "404" and exits the program.
The C code is fairly ...
I'm not a dedicated cryptographer, so I'm looking for someone to look over these functions I wrote and let me know if there are any implementation errors leading to security vulnerabilities or just anything I should improve. Any other comments about improving performance, etc. would be great too...
@retailcoder Sorry, I can't review that ... you can only put 5 tags on each post, and I see [tag=perl] [tag=python] [tag=php] [tag=c] [tag=c++] [tag=ruby] [tag=brainf*ck][tag=befunge] ...... and anyway, I don't know python that well..... ;-)
Other people will be looking at this jquery code and i'm not an expert with jQuery so im asking. How can i make this jQuery code shorter, more efficient, and easier to read?
/*
HEADER NAVIGATION
*/
/* navigation tabs click highlight */
$(".header-main-tabs").click(function() {
$(".header-main...
Is there any alternatives to write oracleCommand.CommandText as a text?
This is my code:
using (var oracleConnection = new OracleConnection(ConnectionString))
{
using (var oracleCommand = oracleConnection.CreateCommand())
{
oracleConnectio...
First of all, I would like to say that I am fairly new to Python and programming. I started learning Python back in September and I know that I have a ton of room for improvement, which is why I am posting my code here
I have a program I am writing that calculates Algebra 2 functions and equatio...
i am working on retinal blood vessel extraction in matlab.. I have applied fuzzy c means segmentation code.this code is to segment the vessels from the retinal image. but this gives me partial output that is all my vessels are not being extracted? can somebody help to modify this code please...
...
Below is a code snippet of how I have been laying out my WPF control XAML. I do it mainly because I get intellisense in the editor and I can change the implementation of the viewmodel and push the layout into a resource file.
However, I am not sure whether you gurus have a better insight into wh...
I'm new to ASP.Net and up until now my code has worked but has been a mish mash all over the place with no real structure. I'm trying to teach myself how to keep the presentation/BLL/DAL separate so I have built a simple page to try and work with.
Page has 3 text boxes: clock number, first name...
I need your help here. It's kinds long, sorry, but this is how is coding, not that east, right?
and... Sorry for my broken English, hope you could understand and help me.
So, to the code part!
Let's say there is a text file containing a matrix of data, where each row and each column has a name....
This is the question.
In comments I received the information that it is off-topic and also someone has downvoted it without any explanation.
As for me I have shown code thats works fine and want to review it.
Please give your feedback.
I have a folder called uploads in this folder is a folder for the year the file was uploaded(2013,2014,2015 etc...), inside the year folder are usernames(rick, dan, edward etc...), inside the usernames folder are folders 1-12 for the month that the file was uploaded.
I want to search through the...
It seems that i dont know your definition of efficiency (which i think is the same for all people in English world). Another thing is when you see that code as a "EXPERIENCED PROGRAMMER" you should know what it is.But as i see you have never worked with this function.. If you wanna help me.. i appreciate it. If not.. please do not write for things that you dont know. Thank you. btw the string is ""dʒadʒi eʃte ɲeri".. it is in Albanian. — user30384032 hours ago
Woah, I'm an experienced programmer - flattered. Comment flagged.
C# with Oracle ODP.NET. CommandText alternatives
I was told in the comments that it is off-topic, and someone has also downvoted it without any explanation.
I have shown code that works fine and want it reviewed.
Please give your feedback.
I have added a link to the Meta question as well (apparently mods can still comment in a locked post), just in case this isn't resolved before the 1-hour lock time.
Well, in 1976 I was still in Junior High School. In 1981 I joined the US Army and worked in a technical job that was not programming. In 1988 I moved to a programming job that was related to the field I had been trained in.
How I can write this code shorter?
.
class Table:
def __init__(self,path,sep):
try:
f = open(path, "r")
read_file = f.read()
f.close()
except:
print "EROR"
return
split_file = read_file.split["\n"]
...
@retailcoder Fortran 4 on punched cards. And when I came back I used Pascal, then a bunch of 4GL database app languages, then C++, then Java, and now Scala.
Well, when you got your printout back the next day, you looked over the printout, tried to figure out what when wrong, typed up the new cards and then put them in the box for the teacher to take over to the computing center. Student programs were only run on Wednesday and Saturday.
@retailcoder Well, FORTRAN wasn't exactly a verbose language at that time. By modern standards, pretty much all software was obfuscated in those days. Every byte counted.
Remember - computer memory was measured in k bytes in those days.
I'm trying to get a good code review on an open-source CMS created with entirely javascript called 'goblin'. Here is the code:
https://github.com/maned/goblin
It uses Node.js, CouchDB, Cradle and Express to do most of it's work. However, there are definitely areas I can improve on, and I'd love...
From Wiki: Access time was 25 millisecond and data transferred at 885 kB/s. Three versions of the removable IBM 3348 Data Module were sold, one with 35 megabyte capacity, another with 70 megabytes, the third also had 70 megabytes, but with 500 kilobytes under separate fixed heads for faster access
I wrote this code in Java without using any methods, just by using simple for loop and if statements. What this does is, when we input a number it checks whether it's a prime or not. If it's a prime, then it prints "It's a prime". And if it's not a prime number, it says "It's not a prime" and pri...
I have some code below that takes different detected users recognized by the Kinect and assigns them a specific random id range based on the player they are. I use this to grab the x,y coordinates of their left or right hand. I was trying to have the Kinect get at least 6 peoples coordinates with...
I wrote the following java program for the Fizz Buzz problem.How can I improve it or make it more efficient?
public class FizzBuzz
{
public static void main(String[] args)
{
System.out.println("--------Fizz Buzz program-------------");
for(int num=1;num<=100;num++)
{
...
I'm a developer with a CS degree and have work experience doing development in a number of languages for almost 3 years.
Today I had an interview, overall it went quite well, I prepared for most of the questions and felt ready for anything. At the end of the interview, they gave me ONE program...
@Jamal If you want to use unixy tools on Windows, I've found that a virtual machine with Linux usually works better than mingw or cygwin. For one, apt-get is awesome.
The aim is to partition an integer.
class partition
{
public static void main(String[] ar)
{
part(66);
}
public static void part(int n)
{
part(n,1,"");
}
public static void part(int n, int st, String prefix)
{
if(n == 0)
{
...
I've been making a RPS game and it works perfectly, but when I try add validation in (shown between hashes) it crumbles.
WHAT ARE I DOING RONG????
from random import randint
from sys import exit
computer = randint(1,3)
r = "r"
p = "p"
s = "s"
print ("The computer has...
I would like the have a second opinion on my code i've written to calculate e
e is a integer that you wherefore the following counts gcd(φ(n),e) = 1 with 1 < e < φ(n)
public int calce()
{
do
{
e = priemgen.newKey(1, euler);
} while (GCD(euler, e) != 1);
return e;
}
p...
@retailcoder Perhaps we should create a "Weekly Challenge Proposals" meta-question where people can suggest challenges? The answer with the most upvotes each week gets chosen as the weekly challenge (answers for already finished challenges can be disregarded in choosing the next challenge)
To decide which subjects we should cover in the Code Review Weekend Challenges I am creating this meta-question.
Propose one challenge per answer. The answer with the most up-votes each week gets chosen as the weekend challenge. (Answers containing already finished challenges is disregarded in c...
To decide which subjects we should cover in the Code Review Weekend Challenges I am creating this meta-question.
Propose one challenge per answer. The answer with the most up-votes each week gets chosen as the weekend challenge. (Answers containing already finished challenges is disregarded in c...
I'm still new to Android development, had a long break due to school and whatnot since I last touched Android. However I did learn a few more things and now I wanted to try making some Text-Adventure project for Android again.
The game will be combination of Text Adventure (navigate through butt...
I've never done a FizzBuzz before, so I decided I would. Please let me know what I could have done better. Run via a .bat file in windows.
@echo off
set loopStart=1
set loopEnd=100
set /a i=%loopStart% - 1
:LoopStart
if %i% == %loopEnd% goto :LoopEnd
set /a i=%i% + 1
set /a fiz...
I created a quiz using the module pattern. My code is as follows:
; (function ($) {
"use strict";
var s,
QuizDefaults = {
modalOverlay: $(".modal-overlay"),
modalWrap: $(".js-modal-container"),
timer: null, // setInterval var for timer
totalSecond...
I have project where I need to use C# and Entity Framework.
After my question here, I have decided to use Unit of Work and Repository patterns.
This is the first time when I'm using this. Can anyone tell me if I'm doing this right or I have to redesign something?
BTW: why do I have to set stu...