Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
18 views

Defining transpose on a collection of irregular collections

I was asked to submit my request for code review on http://stackoverflow.com/questions/10672046/defining-transpose-on-a-collection-of-irregular-collections here. This is a follow-up to the post I ...
8
votes
2answers
113 views

Replacing Python Classes with Modules

I try to avoid using classes in Python as much as possible; if I don't plan on building on it, I don't build it in the first place. It helps me avoid Java-like classes like FileDownloader(), when I ...
2
votes
1answer
49 views

How to dynamically create Python unit tests in a readable way

I have django unittests that are pretty much the following format: class Tests(unittest.TestCase): def check(self, i, j): self.assertNotEquals(0, i-j) for i in xrange(1, 4): for j in ...
2
votes
1answer
111 views

Optimizing and consolidating a big jQuery function

I understand this is a very vague question and a lot of code to look over. My question is basically: I have all these functions that work together to create functionality on a page: is the structure ...
4
votes
2answers
87 views

Attempting to eliminate var (and imperative style) from my Piece class

I've been cooking with gas since I got Daniel C Sobral's help on my last question. I am now re-reading Odersky's "Programming in Scala, 2nd Edition" (finished my first reading about this time last ...
5
votes
1answer
107 views

F# Djikstras shortest path implementation

I'm just getting my feet wet with F#, by implementing some simple algorithms. First up: Djikstras shortest path. There is one piece I've written in this code which confuses me as to why it works: the ...
2
votes
1answer
112 views

F# basic neural network

I just programmed a basic neural network in F# to learn the logical OR function. As I am very new to F# and especially functional programming, I did it the imperative way. And even tho it works, I ...
2
votes
1answer
53 views

Ideal FP/Scala way to vaildate rectangular list

I am learning Scala and FP (Functional Programming), coming from Java, OO and a strong imperative pardigm. I am now trying to implement a small puzzle solving project so I can get some deeper hands on ...
4
votes
1answer
136 views

Simple Haskell key value file store

As an exercise in learning Haskell, I implemented a simple key value store, where you can put and get values (as ByteStrings). (For reference this is inspired by this short note describing bitcask's ...
1
vote
0answers
1k views

PHP Aspect Oriented Design: Part 2

This is a continuation of this post: Review on design pattern What was taken away from that post, and other aspect oriented design is it is hard to debug. To counter that, I implemented the ability ...
4
votes
3answers
935 views

Review on design pattern

I wrote a framework and I want to hear the thoughts of other on the design patterns it uses. Every method contains three design patterns - adapters(strategy), intercepting filters, and observers. A ...
5
votes
1answer
124 views

Project Euler question 2 in CoffeeScript

By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. fib = (x) -> return 0 if x == 0 return 1 if x == 1 ...
7
votes
0answers
576 views

Java monad implementation

I'm learning functional programming and their concept of Monads. I've found nothing more effective in learning than writing an implementation in a programming language I have experience with. I came ...
5
votes
4answers
206 views

Can I make this code more Haskelly?

I am very new to functional programming. I wrote this program where the user can enter an integer and it prints the factorial. If the user enters a negative integer or not an integer at all, it'll ...
5
votes
4answers
314 views

Improving my solution to Project Euler problem #1?

I'm trying to compare my own implementation with another solution of ProjectEuler problem #1, which uses a list comprehension: module Progression1 (sumProgressions) where import Prelude ...

1 2 3
15 30 50 per page