« first day (631 days earlier)      last day (4329 days later) » 

2:28 AM
@KendallFrey
 
@ScottSelby Hey do you know MVC3
 
no , sorry, want to learn it for the next project i start though
StringBuilder sb = new StringBuilder();
for (int x = 1; x <= 100; x++)
{
if ((x % 3 == 0) && (x % 5 == 0))
{
sb.Append("FizzBuzz, ");
}
else
{
if (x % 3 == 0)
{
sb.Append("Fizz, ");
}
if (x % 5 == 0)
{
sb.Append("Buzz, ");
}
if ((x % 3 != 0) && (x % 5 != 0))
{
sb.Append(x.ToString() + ", ");
}
}
}
take that! FizzBuzz
@TonyHarmon - you still here?
 
 
3 hours later…
5:58 AM
... I did it again
I just closed 13 tabs (out of ~50) of this chat room.
 
 
9 hours later…
3:18 PM
Oi all.
how ya'll doing?
 
oi oi
alright, surprised myself by enjoying the tennis
 
ah sports, something my doctor also advises me to do
 
watching, not playing
 
ah :D
 
I'd be comically terrible at tennis and haven't played since i was at school
 
3:23 PM
I'm trying to enable speedstep on my laptop
for some reason this stupid machine doesn't detect that
 
Snake did you ever get an answer to your question?
 
Which one? :)
 
I'm curious, what would happen in your function if you called it like foo "bar", "test"
 
ahhhh that's work related, it's weekend now, will check tomorrow :)
 
lol
 
3:29 PM
no really, I'm so busy on other things ;)
 
I had planned on reading all weekend and instead mowed the lawn, put up a ceiling fan and installed a new sink... can't wait til work starts back up :)
 
:D I read in my bed.
 
Right now I should be reading but feel like blowing up some tanks in WoT :]
I was going to do that.. I registered my two new books with manning press and downloaded the kindle edition but can't find my damn kindle cord to tranfer it over :-/
 
wifi? xD
 
hmmm I do use my network... how can I find the machine?
 
3:36 PM
world of grind more like
 
It's mindless fun... love seeing the tanks blow up 8]
 
what's a tank? xD
brb*
 
Snake, do you know how to add the kindle as a wireless device? My PC isn't seeing it
 
4:11 PM
Guys, Stream respstr = wresp.GetResponseStream(); what namespace uses Stream?
 
@KendallFrey I figured out how you "super star"
 
4:28 PM
hello
any one here ?
 
@user1334247 yo.
 
5:13 PM
hey guys, I'm just starting with the entity framework
I'm using it with some SQLite adapter I found on teh webz
and I'm having problems with Where calls
basically I have something like that:
 
SQLite for .net is teh ballz
 
well
do I have any other sensible option for an easily distributable offline database?
 
well, no...wasn't intended to be a constructive comment. More sharing your frustration
 
heh fine
hang on, visual studio is starting...
 
there are binary compatibility issues with the SQLite adapter
 
5:17 PM
I don't think I'm having that kind of issues though
(sometimes it feels like visual studio needs to solve a NP-complete problem to launch)
 
SQL Server Compact Edition?
 
that could be it I guess
so I have this method
public List<Person> Search(Dictionary<string, string> options)
{
IQueryable<Person> persons = entities.Persons;
foreach (var kvp in options)
{
switch (kvp.Key)
{
case "FirstName":
persons = persons.Where(p => p.FirstName == kvp.Value);
break;

case "LastName":
persons = persons.Where(p => p.LastName == kvp.Value);
break;

case "Birthdate":
persons = persons.Where(p => p.Birthdate == kvp.Value);
break;
}
}

return persons.ToList();
}
wait
public List<Person> Search(Dictionary<string, string> options)
{
IQueryable<Person> persons = entities.Persons;
foreach (var kvp in options)
{
switch (kvp.Key)
{
case "FirstName":
persons = persons.Where(p => p.FirstName == kvp.Value);
break;

case "LastName":
persons = persons.Where(p => p.LastName == kvp.Value);
break;

case "Birthdate":
persons = persons.Where(p => p.Birthdate == kvp.Value);
break;
}
}

return persons.ToList();
}
huh, I guess it isn't the same markup for the chat
well, I still have this method.
in short I pass a set of search criteria to it and I try to "concatenate" the conditions
but it works only when there's just one criterium
if I pass in 2+, I always get an empty list
am I doing something fundamentally wrong or is it the sqlite driver doing something broken?
 
5:32 PM
Why people insist on doing database stuff via programming instead of, oh let's say the database doing it, is beyond me...
 
how's that database stuff?
doesn't building a WHERE clause fall on the programming side to you?
 
no. SQL should be done on the database. Stored procedures are your friend
 
Devil's advocate here
 
thank you for your condescendence, but I'm afraid sqlite doesn't have stored procedures
 
You're welcome and yes it does
 
5:40 PM
why should the database do anything other than store and retrieve data? If the stored procedure expresses something that is application-specific, isn't that business logic that belongs in the application?
 
"Simplicity in a database engine can be either a strength or a weakness, depending on what you are trying to do. In order to achieve simplicity, SQLite has had to sacrifice other characteristics that some people find useful, such as high concurrency, fine-grained access control, a rich set of built-in functions, stored procedures, esoteric SQL language features, XML and/or Java extensions, tera- or peta-byte scalability, and so forth."
 
I agree Tom... but queries should be handled by the DB not the application. Who writes better SQL DBAs or programmers? (though I'm sure you could find exceptions I know the answer to that question)
 
the phrase "stored procedure" is not mentioned anywhere in the sqlite docs
 
if you can tell me how to create a stored procedure with sqlite, I will gladly use them
 
this page, if I understand its description rightly, is supposed to describe every topic available in the online docs sqlite.org/sitemap.html#pindex
zero results
 
5:44 PM
well I must have a weird version because I can create stored procedures in my free version of MS SQL... maybe we are talking different versions
 
what does MS SQL have to do with sqlite?
 
you must be confused about what is sqlite
 
well see, we aren't talking the same thing... simple mistake
but I stand by my principle, selecting, updating, deleting, etc of data should be handled by the database. It's what it does...
 
sqlite is a completely offline database system that basically aims to replace manual data structure management at the file-level
like how C developers use fread/fwrite
to store binary stuff
sqlite lets you use sql statements instead
 
6:13 PM
@zneak You using System.Data.Sqlite?
 
7:00 PM
@walkingTarget yes
okay guys, I was pwned by closures
that has nothing to do with SQLite or the entity framework
same issue as this guy over here -> stackoverflow.com/questions/3869147/…
 
7:15 PM
those damn closures
 
 
1 hour later…
8:32 PM
Sundays are always slow on here. Who in their right mind works on a Sunday anyway?
 
8:52 PM
u?
+ hi btw
 
hello :)
 
good wknd?
 
so far, I just hope the week lives up to its end of the bargain
 
lol touch wood
 
my whole desk is wood :) I use a series of those wood tv dinner tables
 
9:00 PM
well i think ur week will be fine then ;)
 
lol I hope, I have to figure out how to come up with some extra cash to sign a lease for a condo
 
condo... nice
hope it works out
 
me too lol
 
just dont go sellin any organs ;)
 
I am trying to automate a process in .net by using the database to replace being able to have a background process running. And I think I am going to have to refactor one of my database tables =/
Well I am going to Cabo later this year! I will try to return with all of my organs
 
9:05 PM
lol
what sort of process are u replacing with the database?
+ why not have a background process
 
This is on a purely hosted environment and all I have access to is the filesystem
I am trying to replace what should be a background process which monitors a schedule with steps. At each step, the background process would alert.
Instead, I am trying to model that through .net with no background process
 
sounds tricky and im sure i dont fully understand
 
Yeah I can't delve too far into it because some of the business logic is proprietary. But for this most part, at its core, this is production scheduling.
We make widgets, and there are thousands of different types. Each different type has a different path it needs to follow before we can ship it. So, this software will automate the scheduling process for producing the widgets.
 
sounds pretty interesting! im trying to get a basic understandin of agile processes atm.
ur task sounds more fun
 
However, our widgets are hand made. So there must be a good interface to inform the workers which part of the path they should be doing to complete a widget on any given day. They can only work on a handful of widgets in a whole shift.
I really like the agile process, if you are just learning then trying to incorporate some test driven design would go well with that
 
9:13 PM
how long u been working on ur current assignment for?
 
Since February
 
I was told on friday i need to learn unit testing and that it would also be good to get an understanding of agile processes.
 
unit testing is the main part of test driven design. Writing unit tests is definitely best practice, but I tend to test my software in a mock production. I think unit tests work best when you are on a team but I am the only developer
Being able to write a good unit test will definitely look good if you are trying to get a job.
 
duly noted. i still have a book to read on it, i started yesterday but going to get NUnit tomorrow and start practicing.
what specifically do you like about the agile process?
 
Well, my favorite approach is the waterfall design process. However, not everything can be designed 100% before implementation. So, to me, that is where agile comes in - and fits very well - to complete the design while implementing the original model.
I tend to take a scrum approach to agile development
I will figure out what I need to implement or change, go through all of the dependencies, make a checklist based off of the dependencies, and then go through the checklist I made checking off changes so I make sure that everything got done.
 
9:23 PM
aye ok. i havent covered scrum atm, still reading about iterative planning
 
Sometimes the checklist can get a little involved. Especially if the database needs to be changed which is where I am at right now. I think I need to add a new table. I had a table which was for suggesting which work was next, and I think it needs to have a nested table in order to facilitate a many to many relationship between the path of widget building to the details of what to do in a specific part of the path.
"Scrum is an iterative and incremental agile software development method for managing software projects and product or application development."
 
lol, i was looking into linking tables on Thursday
 
Yeah, they are pretty useful :)
 
and was picking kendalls brains about clustered indexes
 
Not sure I am familiar with clustered indexes
 
9:27 PM
From what i understood, it actually groups the data in the tables into related chunks.
ie if i had a table with people (first name, last name) and a clustered index as (first name, last name). If the original records were as follows:
Adam Zbrowski
Amanda Black
Keith Schussler
Mike Downing

If i then added in Kendall Frey, and Frazer Mann, the data would look like
Adam Zbrowski
Amanda Black
Frazer Mann
Keith Schussler
Kendall Frey
Mike Downing
 
Ah, interesting. However, I believe that database partitioning with views would be more efficient than using clustered Indexes.
 
im not familiar with that
arent views temporary, ie they just retrieve data from other tables but dont actually store the data themselfes?
 
I had never heard of it either, but this really awesome guy told me about it. en.wikipedia.org/wiki/Philip_Greenspun, he is a dean for the computer science department at MIT. Basically what you do is you have a table, and then you partition it into views based on ranges. This allows searching to be done inside each view and can greatly reduce query times.
 
would this still be applicable if ur inserting new data into the table on a regular basis?
 
Yes; it's a strategy for dealing with lots and lots of data accessed in different ways.
Here's how SQL Server deals with it: msdn.microsoft.com/en-us/library/ms345146(v=sql.90).aspx
 
9:33 PM
cheers Dash, i will check it out
 
The right index is amazing for select'ing data
Unfortunately, the index also has to be maintained
 
Yes, that requires things like triggers when doing CRUD to maintain the views
 
At table with a large number of updates and inserts will start to go out of sync with the index
Your index becomes fragmented: brentozar.com/archive/2009/02/…
(I chose that link because it's in the context of your original table :-)
 
I just try to 4nf my db and use autoinc primary keys
 
It depends on the problem you are trying to solve :-)
I was going to type up a load of stuff, then remembered the search function: stackoverflow.com/questions/120731/…
 
9:38 PM
That is a good point. But I have a lot of relational data so it seemed to fit.
 
Nothing wrong with that
 
I think I have refactor a table though. Going to be a pain.
Luckily I use a lot of generics so I don't have to make changes in too many places.
 
@dash, thanks for the links, i was just skim reading through the brentozar one. Will definately be coming back to them when i get back to databse design.
 

« first day (631 days earlier)      last day (4329 days later) »