The Glade 4.0

"Turn the lights down, the party just got wilder."
It is currently Fri Dec 14, 2018 9:21 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: Thu Mar 24, 2016 7:30 pm 
Offline
Eatin yur toes.
User avatar

Joined: Mon Sep 07, 2009 2:49 am
Posts: 823
You'd be surprised how simple parts of open source OS's are. The kernel can be tetchy but in userspace there are a lot of very simple tools to build, fix, and extend.


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Mon Mar 28, 2016 10:26 am 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
shuyung wrote:
It's a short step from that to kernel developer.


I'm still staring at the bewildering array of Cygwin downloads in a combination of shock, horror, and curiosity. Holy **** there's a lot of them.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 30, 2016 7:16 pm 
Offline
Web Ninja
User avatar

Joined: Wed Sep 02, 2009 8:32 pm
Posts: 8244
Location: The Tunt Mansion
Bash is coming to windows 10 in the next system update. This means no more need for Cygwin.

http://www.theverge.com/2016/3/30/11333 ... -direction

You chose a pretty good time to start, DE.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 31, 2016 9:04 am 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
Lenas wrote:
Bash is coming to windows 10 in the next system update. This means no more need for Cygwin.

http://www.theverge.com/2016/3/30/11333 ... -direction

You chose a pretty good time to start, DE.


I do not have a positive attitude about Windows updates since the one evening it told me there were "updates" and when I went ahead and did them it started a 3-hour process of updating with no warning.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 31, 2016 2:00 pm 
Offline
Web Ninja
User avatar

Joined: Wed Sep 02, 2009 8:32 pm
Posts: 8244
Location: The Tunt Mansion
Yeah, but this one will be worth it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 31, 2016 5:20 pm 
Offline
User avatar

Joined: Wed Sep 02, 2009 10:49 pm
Posts: 3441
Location: St. Louis, MO
So, two things.

First, Cygwin isn't that tricky to install. Second, you don't need Windows 10 to use it.

Oh, and third, I'm not interested in what distribution of Linux Microsoft thinks I should be using.

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 5:05 pm 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
Aaaand on top of that, it turns out the copy of visual studio I got was for a 30 day trial period and now it wants me to sign into a Microsoft account and use Azure and so forth.

Nope.

Guess it's cygwin for me, if I can figure out which components I need to download. I refuse to create an account with Microsoft for any purpose whatsoever or participate in any of their programs under any circumstances. I most likely won't use any Windows 10 Linux for the same reason; no doubt they'll want to shove some cloud storage crap on you along with it. I expect I'd learn more from the experience of installing Linux the old-fashioned way anyhow rather than the MS "we'll do everything for you and treat your computer like it's a cell phone" attitude.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 5:12 pm 
Offline
Evil Bastard™
User avatar

Joined: Thu Sep 03, 2009 9:07 am
Posts: 7540
Location: Doomstadt, Latveria
LFS forever.

_________________
Corolinth wrote:
Facism is not a school of thought, it is a racial slur.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 6:35 pm 
Offline

Joined: Sun Sep 06, 2009 12:09 pm
Posts: 733
You can always use Eclipse, which is fine (if bloated) but free with a ton of plug-ins

Sent from my SM-G900V using Tapatalk


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 6:45 pm 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
OK, well looks like you can dis-associate the account once you log in with it once. I guess it will do until I figure out what cygwin stuff I need.

What's Eclipse?

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 7:21 pm 
Offline

Joined: Sun Sep 06, 2009 12:09 pm
Posts: 733
It's a freeware IDE, it's got plug-ins to allow you to work with most languages. It's what I've used at most of my software development jobs.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 8:26 pm 
Offline

Joined: Thu Sep 03, 2009 10:03 am
Posts: 4922
Diamondeye wrote:
OK, well looks like you can dis-associate the account once you log in with it once. I guess it will do until I figure out what cygwin stuff I need.

What's Eclipse?


It's the most widely used environment for working with Java. I use it every day. It's not particularly exciting, but it's the standard.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 01, 2016 8:31 pm 
Offline

Joined: Sun Sep 06, 2009 12:09 pm
Posts: 733
The spring boot plug in for it is fantastic

Sent from my SM-G900V using Tapatalk


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2016 5:39 pm 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
I wrote this program to try to see where I was at as far as writing something beyond just expanding book examples, and also since I need to figure out what courses to transfer in for my program (I'm not going to be able to start a Master's program without first getting my undergraduate grades up) and which to leave out - don't want to drag down my stating GPA too much, but I also don't want to re-take a ton of extraneous stuff.

Spoiler:
Code:
// GPAcalculator.cpp : Defines the entry point for the console application.;
// Program requests number of credits earned and grades in those credits and returns a GPA;
// Improvements to be made:  Output data to a text file, including summary of inputs given by the user;
// allow for calculation based on percentage grades rather than letters;
// add summary of grades earned by letter to output;

#include "stdafx.h"
#include <iostream>
#include <cstring>
#include <string>
#include <cctype>
using namespace std;

double grade_values[12]{ 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.3, 1.0, 0.7, 0.0 }; //standardized values for GPA calculation
string grade_letters[] = { "A", "A-", "B+", "B", "B-", "C+", "C", "C-", "D+", "D", "D-", "F" }; //standardized letter grades
double hours_taken[12]; // receives inputs of hours taken at each letter grade
double total_credits = 0.0; //for keeping track of accumulated credit
double total_hours = 0.0;  //for keeping track of total course hours
double input_hours();
double additional_hours(double total_hours, double total_credits); // for credit hours that received GPA values not corresponding to a letter grade.
string yes = "Y";
string yes_no;
void produce_summary(double total_hours, double total_credits);

int main()
{
   cout << "For each letter grade, enter the total number of hours for courses in which you were awarded that grade." << endl;
   input_hours();
   cout << "Do you need to input any course hours at non-standard GPA values?  Enter Y for 'YES'; any other input for 'NO' to receive an average and input summary." << endl;
   cin >> yes_no;
   if (yes_no == yes) {  //determine if the user needs to input any GPA values that do not correspond to typical letter grade values
      additional_hours(total_hours, total_credits);
   }
   produce_summary(total_hours, total_credits);
    return 0;
}

double input_hours() {  //function asks for hours taken at each letter grade successively
   int counter = 0;
   double temp_credits = 0.0;  //for calculating total points towards GPA prior to averaging
   while (counter <= 11) {
      cout << "Enter the number of course hours completed with a grade of " << grade_letters[counter] << "." << endl;
      cin >> hours_taken[counter];
      total_hours = total_hours + hours_taken[counter]; //keeps track of total course hours completed
      temp_credits = hours_taken[counter] * grade_values[counter];  //calculate credit accumulated for grade most recently input
      total_credits = total_credits + temp_credits; //total accumulated credits prior to averaging
      ++counter;
   }
   return total_credits;
}

double additional_hours(double total_hours, double total_credits) {  // function calculates values for GPAs that do not correspond to typical letter grades
   double nonstandard_value = 0.0;
   double nonstandard_hours = 0.0;
   double nonstandard_product = 0.0;
   cout << "Input the nonstandard GPA value to use for additional hours." << endl;
   cin >> nonstandard_value;
   cout << endl << "Input the number of hours taken for which this GPA was awarded." << endl;
   cin >> nonstandard_hours;
   nonstandard_product = nonstandard_hours * nonstandard_value;
   total_hours = total_hours + nonstandard_hours;
   total_credits = total_credits + nonstandard_product;  //after calculating the credit value for nonstandard grades, add to the total for summary function call
   cout << endl << "Do you have any other nonstandard GPA values to input?  Enter 'Y' for YES, any other input to receive your summary." << endl;
   cin >> yes_no;
   if (yes_no == yes) {  //determine if the user needs to input any more nonstandard GPA values
      additional_hours(total_hours, total_credits);
   }
   else {
      return total_credits;
   }
}

void produce_summary(double total_hours, double total_credits) { // summarizes the total hours taken, credit received, and final GPA
   double average_gpa = total_credits / total_hours;
   cout << endl << "Total number of course hours taken: " << total_hours << endl << "Total credit accumulated: " << total_credits << endl << "Final GPA: " << average_gpa <<endl;
   return;
}


For additional exercise, I plan to eventually make it summarize how many of each grade were input, and (when I learn to do such things) make it use a very basic GUI rather than a DOS-like text input.

The one thing I couldn't figure out was how to make it accept either 'y' or 'Y', so presently it's case sensitive, and if the user puts in a lowercase Y it will end rather than calling the nonstandard grades function.

I don't know how efficient or elegant this solution is, but this is what I've learned so far.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2016 12:56 pm 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
Turns out it wasn't working as well as I thought. I fixed it here, and cleaned it up a bit, mainly by eliminating almost all of the global variables.

Spoiler:
Code:
// GPAcalculator.cpp : Defines the entry point for the console application.;
// Program requests number of credits earned and grades in those credits and returns a GPA;
// Improvements to be made:  Output data to a text file, including summary of inputs given by the user;
// allow for calculation based on percentage grades rather than letters;
// add summary of grades earned by letter to output;

#include "stdafx.h"
#include <iostream>
#include <cstring>
#include <string>
#include <cctype>
using namespace std;

double total_hours = 0.0;  //for keeping track of total course hours
double input_hours();
double additional_hours(double total_hours, double total_credits); // for credit hours that received GPA values not corresponding to a letter grade.
void produce_summary(double total_hours, double total_credits);

int main()
{
   char yes_no[2];
   double total_credits = 0.0;
   cout << "For each letter grade, enter the total number of hours for courses in which you were awarded that grade." << endl;
   total_credits = input_hours();
   cout << "Do you need to input any course hours at non-standard GPA values?  Enter Y for 'YES'; any other input for 'NO' to receive your summary." << endl;
   cin >> yes_no;
   yes_no[0] = toupper(yes_no[0]);
   if (yes_no[0] == 'Y') {  //determine if the user needs to input any GPA values that do not correspond to typical letter grade values
      total_credits = additional_hours(total_hours, total_credits);
   }
   produce_summary(total_hours, total_credits);
    return 0;
}

double input_hours() {  //function asks for hours taken at each letter grade successively
   int counter = 0;
   double grade_values[12]{ 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.3, 1.0, 0.7, 0.0 }; //standardized values for GPA calculation
   string grade_letters[12] = { "A", "A-", "B+", "B", "B-", "C+", "C", "C-", "D+", "D", "D-", "F" }; //standardized letter grades
   double hours_taken[12]; // receives inputs of hours taken at each letter grade
   double temp_credits = 0.0;  //for calculating total points towards GPA prior to averaging
   double credits = 0.0; //for keeping track of accumulated credit
   while (counter <= 11) {
      cout << "Enter the number of course hours completed with a grade of " << grade_letters[counter] << "." << endl;
      cin >> hours_taken[counter];
      total_hours = total_hours + hours_taken[counter]; //keeps track of total course hours completed
      temp_credits = hours_taken[counter] * grade_values[counter];  //calculate credit accumulated for grade most recently input
      credits = credits + temp_credits; //total accumulated credits prior to averaging
      ++counter;
   }
   return credits;
}

double additional_hours(double base_hours, double base_credits) {  // function calculates values for GPAs that do not correspond to typical letter grades
   double nonstandard_value = 0.0;
   double nonstandard_hours = 0.0;
   double nonstandard_product = 0.0;
   char yes_no[2];
   cout << "Input the nonstandard GPA value to use for additional hours." << endl;
   cin >> nonstandard_value;
   cout << endl << "Input the number of hours taken for which this GPA was awarded." << endl;
   cin >> nonstandard_hours;
   nonstandard_product = nonstandard_hours * nonstandard_value;
   total_hours = base_hours + nonstandard_hours;
   double total_credits = base_credits + nonstandard_product;  //after calculating the credit value for nonstandard grades, add to the total for summary function call
   cout << endl << "Do you have any other nonstandard GPA values to input?  Enter 'Y' for YES, any other input to receive your summary." << endl;
   cin >> yes_no;
   yes_no[0] = toupper(yes_no[0]);
   if (yes_no[0] == 'Y') {  //determine if the user needs to input any more nonstandard GPA values
      return additional_hours(total_hours, total_credits);
   }
   else {
      return total_credits;
   }
}

void produce_summary(double total_hours, double total_credits) { // summarizes the total hours taken, credit received, and final GPA
   double average_gpa = total_credits / total_hours;
   cout << endl << "Total number of course hours taken: " << total_hours << endl << "Total credit accumulated: " << total_credits << endl << "Final GPA: " << average_gpa <<endl;
}


This little project greatly improved my understanding of how arguments are passed to functions and how it passes a result back. I also got a better appreciation for why to avoid global variables, and how to utilize text strings. I found the book descriptions of these things hard to follow, so actually using them really helped make it all more clear.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2016 6:54 pm 
Offline

Joined: Sun Sep 06, 2009 12:09 pm
Posts: 733
Back in the the day, the thing that helped me improve the most as a developer was taking a Data Structures class.

Sent from my Nexus 9 using Tapatalk


Top
 Profile  
Reply with quote  
PostPosted: Sun May 22, 2016 9:02 pm 
Offline
Commence Primary Ignition
User avatar

Joined: Thu Sep 03, 2009 9:59 am
Posts: 15600
Location: Combat Information Center
I will try to find one in whichever program I end up in.

The book is moving on to classes and objects and I'm completely mystified, but I've only had about 45 minutes to read on the subject so I guess that's not a surprise.

_________________
"Kind-hearted people might of course think there was some ingenious way to disarm or defeat an enemy without too much bloodshed, and might imagine this is the true goal of the art of war. Pleasant as it sounds, it is a fallacy that must be exposed" - On War


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group